11.8. Regex Examples (character class)

Any line that has any of the -a-, -b-, -c-, -d-, -e-, -f-, -@- or -.-

Regex: /-[abcdef@.]-/ 
Input: "ab -q- "
Input: "ab -z-a- "
Input: "ab -.- "
Input: "ab -- "
Regex: /-[a-f@.]-/ 


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