I want to get multiple variable from a string using javascript.
String example:
<span var1="abc" some random thing var2="cde" another random stuff var3="efg"></span>
<span var1="abc" some random thing var2="cde" another random stuff??>
<::" var3="efg"></span>
I want to get var1
, var2
and var3
.
The closest I can get using this regex only for the first group.
span var1="(.*?)"(?:.*)var2="(.*?)"(?:.*)var3="(.*?)"(?:.*)\/span
Here is the example: Example
Thank you!