Regex for password verification

I've looked at some ideas here, but I still seem to be struggling with a regex coming up to suit my requirements.

I need regex to check password format, criteria:

  • At least 1 uppercase letter
  • At least 1 room
  • Alphanumeric characters only (no special characters)
  • At least 8 characters

I am using regex:



However, this also allows the use of type characters !$&


Is there some modification I need to make in order to make it stop accepting these special characters?


source to share

1 answer

Change the last part .{8,}






All Articles