11.12. Quantifiers on character classes

Regex: /-[abc]-/
Input: "-a-"   OK
Input: "-b-"   OK
Input: "-x-"
Input: "-ab-"
Regex: /-[abc]+-/
Input: "-a-"   OK
Input: "-b-"   OK
Input: "-ab-"  OK
Input: "-aa-"  OK
Input: "-x-"

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