useful-regex
Version:
1 lines • 1.03 kB
JavaScript
!function(e,d){"object"==typeof exports&&"undefined"!=typeof module?module.exports=d():"function"==typeof define&&define.amd?define(d):e["useful-regex"]=d()}(this,function(){"use strict";return{Chinese:/[\u4e00-\u9fa5]/,DoubleCharacter:/[^\x00-\xff]/,Phone:/^1(3[0-9]|4[5-9]|5[0-35-9]|66|7[013-8]|8[0-9]|9[89])\d{8}$/,PhoneYidong:/^1(34[0-8]|3[5-9\d]|440|4[78]\d|5[0-27-9]\d|70[356]|78\d|8[2-478]\d|98\d)\d{7}$/,PhoneLiantong:/^1(3[0-2]\d|4[56]\d|5[56]\d|66\d|70[4789]|71|7[56]\d|8[56]\d)\d{7}$/,PhoneDianxin:/^1(3[3]\d|349|410|49\d|53\d|70[0-2]|7[37]\d|740|8[019]\d|99\d)\d{7}$/,Telephone:/0\d{2}-\d{7,8}/,Email:/[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,URI:/[a-zA-z]+:\/\/[^\s]*/,URL:/https?:\/\/[^\s]*/,QQ:/[1-9][0-9]{4,}/,PostalCode:/[1-9]\d{5}(?!\d)/,IDCard:/^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/,Integer:/^-?[1-9]\d*$/,PositiveInteger:/^[1-9]\d*$/,NegtiveInteger:/^-[1-9]\d*$/,NonPositiveInteger:/^-[1-9]\d*|0$/,NonNegtiveInteger:/^[1-9]\d*|0$/}});