11.9. Regex Examples (^ in character class)

^ as the first character in a character class means "a character that is not listed in this character class"

Regex: /-[^abc]-/
Input: "abc -a- z"
Input: "abc -z- z"

If you are interested in on-site trainings by the author, please contact me directly.

Online courses:

Would you like to get
updated when I publish
the next article?

Follow me:

Google Plus Twitter RSS feed