I want to check if a string matches only some regular expression characters.
For example, I would like to match only a , b or c .
So, "aaacb" will pass, but "aaauccb" will not (due to u ).
I tried this way:
/[a|b|c]+/
but this will not work because an unsuccessful example passes.
source share