So I have the following sample XML on a single line:
<foo>123</foo> <foo>456</foo> <bar>abc</bar> <foo>789</foo> <foo>0AB</foo> <bar>def</bar>
I'm looking for a regex which matches the first pair of <foo>
tags, and which stops at the first <bar>
I'm trying solutions around:
/<foo>.\+<\/foo>.\+<bar
But this matches the entire thing. How do I get it to stop at the first <bar>
?