Last active
December 22, 2015 13:19
-
-
Save asvechkar/6478468 to your computer and use it in GitHub Desktop.
регулярные выражения
This file contains hidden or 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
| # Matching a Username | |
| /^[a-z0-9_-]{3,16}$/ | |
| # Matching a Password | |
| /^[a-z0-9_-]{6,18}$/ | |
| # Matching a Hex Value | |
| /^#?([a-f0-9]{6}|[a-f0-9]{3})$/ | |
| # Matching a Slug | |
| /^[a-z0-9-]+$/ | |
| # Matching an Email | |
| /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/ | |
| # Matching a URL | |
| /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/ | |
| # Matching an IP Address | |
| /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/ | |
| # Matching an HTML Tag | |
| /^<([a-z]+)([^<]+)*(?:>(.*)<\/\1>|\s+\/>)$/ | |
| # рязань.2013.09.клиенты.xlsx | |
| /([^.]{7})/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment