JavaScript - Asking for advice on password regularity
PHP中文网2017-06-12 09:28:59
0
4
653
/^(\w){8,50}$/ This is a regular pattern for 8 to 50 alphanumeric underscores. Now we need to add support for all special symbols (such as %@, etc.) , how to modify
/^(.*){8,50}$/
matches any characters, not only special characters
Try it
/^[w%@]{8,50}/
Just put the special characters you need to add into the[]
character set.[]
means matching any element in it./^(s*){8,50}$/
Try it