The Caret (^) character is also referred to by the following terms:
It has two uses in regular expressions:
[^) it acts to negate the set of allowed characters (i.e.
means the character 1, 2, or 3 is allowed, whilst the statement
[^123]means any character other than 1, 2, or 3 is allowed.
To express a caret without special meaning, it should be escaped by preceding it with a backslash; i.e.