The regular expression matches the user password, and the regular expression matches the user password.

Source: Internet
Author: User

The regular expression matches the user password, and the regular expression matches the user password.

The password format can be set based on the development requirements. The following is an example of password matching:

Regular Expression ^ [a-zA-Z] \ w {5, 17} $

It must start with a letter and be 6 ~ It can only contain characters, numbers, and underscores.

Mismatch

Regular Expression ^ (? =. * \ D )(? =. * [A-z]) (? =. * [A-Z]) (?!. * \ S). {4, 8} $

Match 1agdA * $ # | 1agdA * $ # | 1agdA * $ #

Does not match wyrn % @ * & $ # f | mbndkf000082 | BNfhjdhfjd & *) % # $)

Regularizedregular expression [^ A-Za-z0-9]

Match! @ # $ | % ^ & * | '> <?., "

Does not match ABC123abc | abc123ABC | abc0132ABC

Regular Expression Password = "(\ {. + \} [0-9a-zA-Z] + [=] * | [0-9a-zA-Z] + )"

Match! @ # $ | % ^ & * | '> <?., "

Does not match ABC123abc | abc123ABC | abc0132ABC

Regular Expression (? -I )(? = ^. {8 ,}$ )((?!. * \ S )(? =. * [A-Z]) (? =. * [A-z]) (? = (1 )(? =. * \ D) |. * [^ A-Za-z0-9]) ^. * $

Match a3dAbed. | P @ ssword1 | AB _1bbbb | myPassw0rd!

Password mismatch | password12 | password _ 12 | p @ ssw0rd

The above section describes the regular expressions used to match user passwords. I hope they will be helpful to you!

Articles you may be interested in:
  • Php password Regular Expression for password verification (8-bit length limit)
  • Example of a java Regular Expression matching all URLs and link texts on a webpage
  • Matching strings for js Regular Expression learning notes
  • Python uses regular expressions to detect password strength source code sharing
  • Regular Expression matching techniques that do not contain certain strings
  • C # Sharing of four regular expressions matching Chinese strings
  • Use a regular expression to restrict the account password, email, ID card, and mobile phone number.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.