Reputation: 12347
I am using a positive lookahead regex to get the matched string, but it gives me Syntax error in regular expression
in IE8 what am I doing wrong. I want to match the very 1st occurrence.
Matching input
<IMG title="Configuration older than 90 days" alt=true src="http://indwdev:6130/include/images/expired.png"><IMG title="Converted configuration" alt=true src="http://indwdev:6130/include/images/convert.png">
My regex str.match(/(?<=Converted configuration" alt=)[\w]+(?=)/)
Here is a jsfiddle link.
Upvotes: 0
Views: 249
Reputation: 13201
Javascript doesn't support positive lookbehinds in its regexes. You can use
str.match(/Converted configuration" alt=([\w]+)/)[1]
Upvotes: 2