Use character class.
So use: /^[A-Za-z0-9]+$/
And yes, testuser
is a valid input for the above regex.
2
solved JavaScript : Alphanumeric REGEX pattern [closed]
Use character class.
So use: /^[A-Za-z0-9]+$/
And yes, testuser
is a valid input for the above regex.
2
solved JavaScript : Alphanumeric REGEX pattern [closed]