I have this string:
<x> <span class='var'>or<tg>test<pk>testing</pk></tg><tx>or</tx><tg>teste<pk>testando</pk></tg></span></x>
I'm using this pattern:
<tg>(.*)<pk>(.*)</pk></tg>
But it's replacing from the first <tg>
to the last one, ignoring the </tg>
in the middle.
My replacement string:
<a href='def.aspx?&word=$2'>$1</a>