var search = new RegExp("<span class=\"highlight\">(?<text>.*)</span>", "g");
Is there something wrong with the RegEx? Firebug just says "invalid quantifier". Thats it, no more information.
(? Is there something wrong with the RegEx? Firebug just says "invalid quantifier". Thats it, no more information. Copyright © 2021 Jogjafile Inc.
Javascript RegEx "invalid quantifier"
744 Views
Asked by
Display Name
At
var search = new RegExp("<span class=\"highlight\">(?<text>.*)</span>", "g");
There are 1 best solutions below
Related Questions in JAVASCRIPT
Related Questions in REGEX
Related Questions in QUANTIFIERS
Trending Questions
Popular Questions
The question mark quantifier is wrong there. You want to match and collect between the brackets
(). Doing(?is wrong, if you want to match(you should escape the brackets.var search = new RegExp("<span class=\"highlight\">(<text>.*)</span>", "g");