I’ve been trying to create a RegEx for a string for almost a day and still haven’t made it work, can anyone help?
string example (double quotes are options, and can also be single quotes):
"234"? "<img src=\"http://abc.com/a.jpg\" onclick=\"alert(\"\"working with 'quotes'?\"\");\" />"
and the following groups should be extracted:
234
<img src="http://abc.com/a.jpg" onclick="alert(""working with 'quotes'?"");" />
hope this is clear, anyone help pls!!
I’m not sure about the efficiency of this regex, but here is one that matched your string.
Rules
Input
Regex
Output Groups