RegExp? = Quantifier
Definition and Usage
?= N quantifier any subsequent immediately specified stringnstring matching.
grammar
new RegExp("regexp(?=n)")
或者
/regexp(?=n)/
或者
/regexp(?=n)/
Browser Support
All major browsers support? Quantifier =
Examples
Examples
It is followed by "all" of "is" a global search:
var str="Is this all there is";
var patt1=/is(?= all)/g;
var patt1=/is(?= all)/g;
The marked text below shows where the expression gets a match:
Is th is all there is
try it"
JavaSript RegExp objects