PerBonomi
4 years agoBoss
RegEx replace hyperlink
I wonder if someone can help me with this one, since I'm having limited success.
I'm trying to turn this
<a class="cust-a" title="linktitle" href="http://thisismyurl.com" alt="alt here" >link text</a>
into this
[link text|http://thisismyurl.com]
This gets me the link text, but apart from that I'm stuck. And I'd really like to do both of them in one replace, if possible.
str?replace("(?i)<a([^>]+)>(.+?)<\\/a>","$2","rgmi")