I have this regex
var reg = new RegExp('["\\>]{1}\\$([^"\\<\\> ]*)["\\<]{1}', 'g');
That I run on this string
'<span>$name</span><img src="$images[0].src"><img src="$images[1].src"><img src="$images[2].src">'
If I test it on sites like RegExr it works properly but if I test it in FireFox
var reg = new RegExp('["\\>]{1}\\$([^"\\<\\> ]*)["\\<]{1}', 'g');
var match = reg.exec('<span>$name</span><img src="$images[0].src"><img src="$images[1].src"><img src="$images[2].src">');
console.log(match);
It only matches ">$name<"
. How to have it catch all like on the site?
This is not a duplicate. i'm not working with query strings, beside it works online of the site.