I am trying this Regex -
/^[a-zA-Z0-9]([a-zA-Z0-9-/&\s)])*/
Allow any name which starts with group 1 and also allow repetition of character's from second group.
It doesn't work for following - a$
I think since it is matching with first character . test () returning true for it.
How to write correct regex for it?
Examples :
abc- Should Match
abc. should Match
az-az should match
0a9.0a9 should match
a$ Shouldn't Match
$ Shouldn't Match
abc 1 abc. Should Match
abcz&abc& Should Match
az# Shouldn't Match
az#az Shouldn't Match
ABC' Should Match
ABC'XYZ-1239 Should Match