JavaScript RegExp ?= quantifier
The JavaScript RegExp object
Definition and Usage
?=n The quantifier matches any string immediately followed by the specified string n the specified string.
Syntax
new RegExp("
regexp
(?=
n)
")
or
/
regexp
(?=
n)
/
Browser support





All major browsers support the ?= quantifier
Example
Example
Perform a global search for "is" immediately followed by "all":
var str="Is this all there is";
var patt1=/is(?= all)/g;
The text marked below shows where the expression found matches:
Is th
is
all there is
Try it »
The JavaScript RegExp object