标签:
var pattern1 = /好/g; console.log(pattern1.test("你好"));
字符串查找:
var pattern1 = /\w/;
console.log(pattern1.test("njkhjkjk"));
空格查找:
var pattern1 = /\s/;
console.log(pattern1.test("njkhjkjk"));
标签:
原文地址:http://www.cnblogs.com/xupeiyu/p/4373912.html