摘要: usingSystem;2usingSystem.Text.RegularExpressions;34namespacebobomousecom.crm5{6/**//**//**////<summary>7///Regexlib的摘要说明。8///</summary>9publicclassRegexlib10{11publicRegexlib()12{13//14//T... 阅读全文
posted @ 2010-09-10 09:30 马建康 阅读(839) 评论(0) 推荐(0)
摘要: "^\d+$"  //非负整数(正整数 + 0) "^[0-9]*[1-9][0-9]*$"  //正整数 "^((-\d+)|(0+))$"  //非正整数(负整数 + 0) "^-[0-9]*[1-9][0-9]*$"  //负整数 "^-?\d+$"    //整数 "^\d+(\.\d+)?$"  //非负浮点数(正浮点数 + 0) "^(([0-9]+\.[0-9]*[1-9][0-9]... 阅读全文
posted @ 2010-09-10 09:18 马建康 阅读(230) 评论(0) 推荐(0)
摘要: 匹配中文字符的正则表达式: [\u4e00-\u9fa5]匹配双字节字符(包括汉字在内):[^\x00-\xff]应用:计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)String.prototype.len=function(){return this.replace([^\x00-\xff]/g,"aa").length;}匹配空行的正则表达式:\n[\s| ]*\r匹配HTML... 阅读全文
posted @ 2010-09-10 09:17 马建康 阅读(217) 评论(0) 推荐(0)