My password should be: alphanumeric characters (uppercase and lowercase English letters, numbers, and symbols such as @, #, * and &)
How do make a regular expression for such rules?
I tried: ^\\s*[a-zA-Z0-9_\\-\\.]*\\s*$
The value that gives the error: 45a$ and 1a@
CodePudding user response:
try this
[A-Za-z0-9@#\*&]*
