What is the regex using javax.validation.constraints @Pattern for user not to be able to choose username such as "admin" or "manager"?
I am not understanding how to use "?!" to indicate word which must be excluded. Could you please suggest some examples with exclusion of just "admin" string and I will figure out the rest.
You can use the following expression which will match any value that is not
manager
oradmin
:and if you want to disallow the user to choose usernames which contain
manager
oradmin
anywhere in the string likeusr_admin
,myManager_101
, etc ..Then you can use the following: