Give can glance at the following example to know how to use the g modifier.
Do a global search for "as":
Code:
var str="Assure me as soon as possible";
var patt1=/is/g;
The output of the above RegExp Modifiers will be :
Code:
Assure me as soon as possible
The underlined text shows where the expression gets a match.
If you do the global, case-insensitive search for the above same example,
Code:
var str="Assure me as soon as possible";
var patt1=/is/gi;
The output will be like this :
Code:
Assure me as soon as possible
Bookmarks