正則基礎

一:正則的建立方式。javascript /*1.使用構造函數建立*/ var reg1 = new RegExp('helloWorld'); var result1 = reg1.test('helloWorld js'); console.log(result1);//true /*2.使用字面量建立*/ var reg2 = /hell
相關文章
相關標籤/搜索