Why does
^[a-zA-Z][\w.,\$;]{0,6}$
match the abc part of the string abc! and not outright reject it?
Why does
^[a-zA-Z][\w.,\$;]{0,6}$
match the abc part of the string abc! and not outright reject it?
What regex engine are you using? Matching in Ruby (which I believe uses PCRE) doesn't match:
> "abc!".match /^[a-zA-Z][\w.,\$;]{0,6}$/
=> nil