正则表达式

var defaultVal = {
NUMBER : "^[0-9]*$",
TEL : "^0(10|2[0-5789]|\\d{3})-\\d{7,8}$",
IP : "^((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]|[*])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]|[*])$",
MOBILE : "^1(3[0-9]|5[0-35-9]|8[0235-9])\\d{8}$",
MAIL : "^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$",
IDENTITY : "((11|12|13|14|15|21|22|23|31|32|33|34|35|36|37|41|42|43|44|45|46|50|51|52|53|54|61|62|63|64|65|71|81|82|91)\\d{4})((((19|20)(([02468][048])|([13579][26]))0229))|((20[0-9][0-9])|(19[0-9][0-9]))((((0[1-9])|(1[0-2]))((0[1-9])|(1\\d)|(2[0-8])))|((((0[1,3-9])|(1[0-2]))(29|30))|(((0[13578])|(1[02]))31))))((\\d{3}(x|X))|(\\d{4}))",
CHINESE : "^([\u4E00-\uFA29]|[\uE7C7-\uE7F3])*$",
URL : "^http[s]?://[\\w\\.\\-]+$"
};

posted @ 2014-02-26 15:34  Look_Sun  阅读(240)  评论(0编辑  收藏  举报