JavaScript RegExp ?=Quantifier
JavaSript RegExp Object
Definition and Usage
?=nThe quantifier matches any string that is immediately followed by the specifiednstring.
Syntax
new RegExp("regexp(?=n)")
Or
/regexp(?=n)/
Or
/regexp(?=n)/
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the ?= quantifier
Example
Example
Do a global search for "is" immediately followed by "all":
var str="Is this all there is";
var patt1=/is(?= all)/g;
var patt1=/is(?= all)/g;
Belowmarkedtext shows the position where the expression gets a match:
Is this all there is
Try it yourself »
JavaSript RegExp Object Other Extensions