javascript RegExp

var str="Is this all there is?";
var patt1=/is/g;

1. match

  str.match(patt1);

2. test

  patt1.test(str);

3. exec

  patt1.exec(str); 

原文地址:https://www.cnblogs.com/kevinge/p/1772140.html