摘要: JS正则 方法 test 判断字符串是否符合规定的正则(只要包含就返回true) 1. rep =/\d+/ rep.test(“asdda12assa23”) 返回 true 2. rep = /^\d+$/ rep.test(“asdda12assa23”) 返回false exec 获取匹配的 阅读全文
posted @ 2018-09-25 16:09 谭普利特 阅读(153) 评论(0) 推荐(0) 编辑