Regular regular password replay: at least 3 letters, 3 numbers, without double quotes

This is the regular expression for HTML5 pattern="..."inside < input type="password" ... />, which should be:

  • At least 8 characters, no more than 32.
  • Must contain at least 3 letters.
  • Must contain at least 3 numbers.
  • Must contain anything else that ASCII except double quotes (single quotes are ok).

This is what I called:

<b> ^. * (? =. {8,32}) (? =. * [A-Za-Z] {3,}) (? =. * \ D {3,}) (? =. * [^ \ X22] +). * $

But here are the problems:

  • Double quotes are still allowed in the password!
  • This expression will only match when there are three INDIRECT numbers or letters, and not when they are interspersed with other characters.

-: O'Reilly's, - .., , .

, .

+4
2

:

^(?=(?:.*?[a-zA-Z]){3})(?=(?:.*?\d){3})[^\x22]{8,32}$

ReGEx

:

^(?=(?:[^a-zA-Z\n]*[a-zA-Z]){3})(?=(?:[^\d\n]*\d){3})[^\x22]{8,32}$
+1

:

^(?=(.*?[a-zA-Z]){3,})(?=(.*?\d){3,})(?=.*?[^a-zA-Z0-9\"])[^\"]{8,32}$

https://regex101.com/r/nY0bL2/1 - - .

0

All Articles