Regular expression matches user password _ regular expression

Source: Internet
Author: User

The form of the password can be set according to the development requirements, below are several examples of matching passwords:

Regular Expression ^[a-za-z]\w{5,17}$

Matches start with a letter, length between 6~18, only characters, numbers, and underscores

does not match

Regular expression ^ (? =.*\d) (? =.*[a-z]) (? =.*[a-z]) (?!. *\s). {4,8}$

Matching 1agda*$# | 1agda*$# | 1agda*$#

Do not match wyrn%@*&$# f | mbndkfh782 | bnfhjdhfjd&*)%#$)

Regular expression [^a-za-z0-9]

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

Mismatched ABC123ABC | ABC123ABC | Abc0132abc

Regular Expression password= "(\{.+\}[0-9a-za-z]+[=]*|[ 0-9a-za-z]+) "

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

Mismatched 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!

Mismatched password | password12 | Password__12 | P@ssw0rd

The above is a small series to introduce the regular expression matching user password related content, I hope to help you!

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.