I could be too tired, but:
The above makes sure you have at least one character, if you want to allow an empty set, you could use a '*' instead of the '+'
You couldn't use the \w because that would allow a '_' which wasn't in your selection set.
But if a '_' was leagal (as it is in Perl)
should do the same thing.
Code:
^[a-zA-z0-9]+$The above makes sure you have at least one character, if you want to allow an empty set, you could use a '*' instead of the '+'
You couldn't use the \w because that would allow a '_' which wasn't in your selection set.
But if a '_' was leagal (as it is in Perl)
Code:
^\w+$should do the same thing.