sample codes:
<div>content</div><a href="http://www.example.com">jump link</a>
<div>content</div><a href="http://www.example.com">jump link</a>
<div>content</div><a href="http://www.example.com">jump link</a>
I want to replace the first or the end anchor element() of matches in a string.
my regex pattern is:
<a.[^>]*>.[^<>]*</a>
that would be matches all anchor elements
actually I just want to replace the first match only but I'm really curious about the possibility to replace at the end of matches.
Thanks