How to write negated character class regex?
A negation class is a character class that begins with a
"^" metacharacter which will exclude a set of defined characters within a square brackets. For example the negation class
h[^ao]t in the example below match only the word
hit and exclude the words
The program output the following result:
Text "hit" found at 30 to 33.