摘要: 正则表达大全 $ 匹配行结束符。例如正则表达式weasel$ 能够匹配字符串"He's a weasel"的末尾,但是不能匹配字符串"They are a bunch of weasels."。 ^ 匹配一行的开始。例如正则表达式^When in能够匹配字符串"When in the course 阅读全文
posted @ 2016-12-08 19:03 Barbie7 阅读(492) 评论(0) 推荐(0) 编辑
摘要: 常用正则表达式大全!(例如:匹配中文、匹配html) 特殊表达式 : 1.货币格式: '123123211312.333333'.replace(/(?=(?!^)(?:\d{3})+(?:\.|$))(\d{3}(\.\d+$)?)/g, ',$1') //输出 123,123,211,312.3 阅读全文
posted @ 2016-12-08 19:02 Barbie7 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 正则匹配身份证号码 正则匹配身份证号码 正则匹配身份证号码 /^[1-9][0-7]\d{4}((19\d{2}(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(19\d{2}(0[13578]|1[02])31)|(19\d{2}02(0[1-9]|1\d|2[0-8])) 阅读全文
posted @ 2016-12-08 19:01 Barbie7 阅读(6061) 评论(0) 推荐(0) 编辑