Last active
July 11, 2019 08:19
-
-
Save bulatie/fc86ae7f77d020acea82f6e1465548c3 to your computer and use it in GitHub Desktop.
regex
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
var fileOrPath = /^((((?:\.\/|\.\.\/|\/)?(?:[.\w-_]+\/)*)([.\w-_]+)*),?)+$/ | |
var email = /^[a-z0-9]+([._\\-]*[a-z0-9])*@(?:(?!qq|gmail|163|sina|live|126|yeah|sohu|hotmail|outlook|263|googlemail|yahoo|sogou|21cn|189|aliyun|foxmail|139|10086)[a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/ | |
var phone = /^1\d{10}$|^(0\d{2,3}-?|\(0\d{2,3}\))?[1-9]\d{4,7}(-\d{1,8})?$/ | |
var hexstring = /\b[0-9a-fA-F]+\b/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment