CSDN博客

img binghen118

正则表达式

发表于2008/9/29 22:07:00  175人阅读

var isLoginName = "^[A-Za-z][A-Za-z0-9//_//@//.]+$";
var isFaxNumber = "^[0-9//-]+$";
var isNumOrWord = "^[A-Za-z0-9]+$";
var isPassWord =  "^[A-Za-z0-9//_//@]+$";
var isNumber = "^[0-9]+$";
var isNotEmpty = ".+";
var isNotSpace = "^//S+$";
var isPositiveNumber = "^//d+//.?//d*$";
var isPositiveNumber_12_2 = "^//d{1,10}(
//.//d{0,2}){0,1}$";
var isPositiveNumber_10_2 = "^//d{1,8}(
//.//d{0,2}){0,1}$";
var isPositiveNumber_10_3 = "^//d{1,7}(
//.//d{0,3}){0,1}$";
var isPositiveInteger = "^//d*[1-9]+//d*$";
var isPositiveNumber_15_3 = "^//d{1,12}(
//.//d{0,3}){0,1}$";
var isMobile = "^13//d{9}$";
var isZipCode = "^//d{6}$";
var isBpNumber = "^//d{5,8}[-]?//d{3,7}$";
var isPhoneNumber = "^//d{6,8}$";              
var isFileName = "^[a-zA-Z0-9//.-_]+$";
var isWord = "^//w+$";
var isPidNumber = "^[1-9]//d{14,17}[xX]?$";
var isValidDate = "^((1[6-9]|[2-9]//d)?//d{2})-(((0[13578]|1[02])-31)|((0[1,3-9]|1[0-2])-(29|30)))$|^(((1[6-9]|[2-9]//d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))-(02-29)$|^((1[6-9]|[2-9]//d)?//d{2})-((0[1-9])|(1[0-2]))-(0[1-9]|1//d|2[0-8])$";
var isValidDateWithTime= "^((1[6-9]|[2-9]//d)?//d{2})-(((0[13578]|1[02])-31)|((0[1,3-9]|1[0-2])-(29|30)))(
//s((//b0//d//b)|(1//d)|(2[0-3])):((//b0//d//b)|([1-5]//d))){0,1}$|^(((1[6-9]|[2-9]//d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)))-(02-29)(//s((//b0//d//b)|(1//d)|(2[0-3])):((//b0//d//b)|([1-5]//d))){0,1}$|^((1[6-9]|[2-9]//d)?//d{2})-((0[1-9])|(1[0-2]))-(0[1-9]|1//d|2[0-8])(//s((//b0//d//b)|(1//d)|(2[0-3])):((//b0//d//b)|([1-5]//d))){0,1}$";
var isEmail = "^//w+((-//w+)|(
//.//w+))*//@[A-Za-z0-9]+((//.|-)[A-Za-z0-9]+)*//.[A-Za-z0-9]+$";
var isChineseName = "^[/u4E00-/u9FA5]{2,}$";
var isChinese= "^[/u4E00-/u9FA5]+$";
var isURL = "^(
http://){0,1}.+//..+//..+$";
var isValidDateText="^[0-9]{4}[-//.//][0-1]{1}[0-9]{1}[-//.//][0-9]{1,2}$";
var isDbString="[^'%/"<>]+";
//var isNumber = "[01]";
var isSpecNumber = "^//-?//d*[0-9]+//d*$";
var isPosiInteger = "^//d*[0-9]+//d*$";
var isBillDt = "^((1[6-9]|[2-9]//d)?//d{2})(0[1-9]|10|11|12)$";
var isNumber2 = "^//d{2}$";
var isNumber3 = "^//d{3}$";
var isNumber4 = "^//d{4}$";
var isNumber5 = "^//d{5}$";
var isNumber6 = "^//d{6}$";
var isNumber7 = "^//d{7}$";
var isNumber8 = "^//d{8}$";
var isNumber9 = "^//d{9}$";
var isNumber10 = "^//d{10}$";
var isNumber11 = "^//d{11}$";
var isPositiveNumber11 = "^//d{11}$";
var isPassWord6 =  "^[A-Za-z0-9//_//@]{6}$";
var isPassWord16 =  "^[A-Za-z0-9//_//@]{16}$";
var isRate = "^((
//d{1,2}//.//d{1})|(//d{1,2})|(100)|(100//.0))$";
var isRate2 = "^((
//d{1,2}//.//d{1,2})|(//d{1,2})|(100)|(100//.0)|(100//.00))$";
var isMon = "^((
//d{1,6}//.//d{1,2})|(//d{1,6}))$";
var isValidDateFormat = "(
//d{4}//-((0[1-9])|(1[012]))//-((0[1-9])|([1-2][0-9])|(3[01])))";
var isMon14 = "^((
//d{1,12}//.//d{1,2})|(//d{1,12}))$";
var isMon10 = "^((
//d{1,8}//.//d{1,2})|(//d{1,8}))$";
var isMon8 = "^((
//d{1,6}//.//d{1,2})|(//d{1,6}))$";

0 0

相关博文

我的热门文章

img
取 消
img