Latest web development tutorials

RegExp? = Quantifier

RegExp Object Reference JavaSript RegExp objects

Definition and Usage

?= N quantifier any subsequent immediately specified stringnstring matching.

grammar

new RegExp("regexp(?=n)")

或者

/regexp(?=n)/


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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;

The marked text below shows where the expression gets a match:

Is th is all there is

try it"


RegExp Object Reference JavaSript RegExp objects