I have a string like this
<tag1>
<tag1>
any text
</tag1>
text
</tag1>
and I want to find a <tag1>, that contains shortest text in this string.
I used the following regex <tag1>.*?</tag1>, but instead of <tag1>any text</tag1> i got <tag1> <tag1>any text</tag1>. Here is the example.
Why it doesn't works and what am I doing wrong?