正則表達式的應用

正則表達式 定義和使用 var patt1 = new RegExp("hello"); var patt2 = /world/; test方法 test()方法檢索字符串中的指定值,返回值是true或者falsejavascript var pat = /my/; var attr = 'this is my gril friend' console.log(par.test(attr));
相關文章
相關標籤/搜索