Vote count:
0
I need to disallow combinations in this structure:
- start by small "u"
- the 5 following characters can not be numbers within (if starts by "u")
- except this disallowed combination, allow only
[a-zA-Z0-9]+
I did only regex like ^[^u][^0-9][^0-9][^0-9][^0-9][^0-9]$
, because I have no idea for add only except for starting by "u".
List of some allowed combinations:
And list of disallowed combinations:
I need this for aliases for system-generated name like "u20". Because I am creating system, when user can be identified by name/alias/e-mail (just looking for that string in database) and because user do not must set own alias, I want get there some limits. The destination of this regex is "pattern" in input tag in HTML and PHP check after submit (for older browsers)
If you have some interesting tutorials to do that/topics with simiplar problem or you just want help me, thanks you in advance :)
Greetings
Aucun commentaire:
Enregistrer un commentaire