From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript RegExp Object
The g modifier is used to perform a global match (find all matches rather than stopping after the first match).
|
new RegExp("regexp","g") or simply: /regexp/g |
Example 1Do a global search for "is":
The marked text below shows where the expression gets a match:
Try it yourself » |
Example 2Do a global, case-insensitive search for "is":
The marked text below shows where the expression gets a match:
Try it yourself » |
JavaScript RegExp Object
From http://www.w3schools.com (Copyright Refsnes Data)