Created
October 15, 2010 10:26
-
-
Save while0pass/627970 to your computer and use it in GitHub Desktop.
regexps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
email address | |
^\w*([A-Z0-9._%-]+@([A-Z0-9\-]\.)+[A-Z]{2,6})\w*$ | |
options: case insensitive | |
При сохранении имейла надо сохранять только группу схваченную в скобках. | |
По бокам допускаются пробельное пространство. | |
password with at least 8 characters | |
containing at least one digit or punctuation mark, one upper case and one lower case letter | |
^(?=.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).* | |
(?![.\n]) means that the pattern doesn't match password if it contains dot or new line char | |
in the very beginning. Does it really matter? | |
options: multiline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment