The dot (after the 9) means any character; if you remove it, it's
gonna only accept a-zA-Z0-9

The dot is probably not the issue here as it appears as part of a character sequence.

If you don't want to match with any '_' then replace the \w since it matches "alphanumeric + '_'".

It's not clear to me what your intention is for the second set of square braces, but it looks like you're trying to get grouping. You probably want parentheses instead.

Try something like this:



Samer Abukhait wrote: