Hi,
I want to create a regular expression for the username field on registration, that disallow users from using certain words, and some characters limitations.
By seaching the forums I have found some expressions that could help me, but I'm not sure about the right way to combine it together.
I think, this should disallow from people to use the word "term1" and to force them to use this only characters.
If then, I want to add here also "term2" as a forbidden string.
Can you organize it for me plz?
Thank you.
I want to create a regular expression for the username field on registration, that disallow users from using certain words, and some characters limitations.
By seaching the forums I have found some expressions that could help me, but I'm not sure about the right way to combine it together.
Code:
(?!^term1$)^[a-zA-Z0-9 _-]+$
If then, I want to add here also "term2" as a forbidden string.
Can you organize it for me plz?
Thank you.
Comment