Replace href= with alink
Posted: Tue Nov 14, 2006 6:55 pm
My regex is a little rusty...lol, very rusty.
Here is what I'm trying to do:
I have a long string of text with links embedded.
I need to replace the links with this:
So the above paragraph would like like this when complete:
Thanks for the help.
Here is what I'm trying to do:
I have a long string of text with links embedded.
Code: Select all
$myText = 'Lorem ipsum blandit eligendi gubergren <a href="http://example.com">ea his, ad rebum</a> facer cum. Est iudico fierent no. Tantas appetere scribentur quo id, ne eius omittantur nec. Duo at falli comprehensam. Et impedit nostrum usu, id vel timeam tincidunt intellegat.
Sint meis maiorum vix et, facilisi intellegat interesset ad nec. Quo mazim ornatus signiferumque at. Quo ei copiosae nominati, in summo debet recusabo quo. An has nullam nominavi fabellas, te ubique epicurei vix, eleifend aliquando <a href="http://example.com">http://www.example.com</a>at vel. Eam et ponderum perpetua maiestatis.';Code: Select all
<c:alink:http://example.com>Text in the link</c:alink>Code: Select all
$myText = 'Lorem ipsum blandit eligendi gubergren <c:alink:http://example.com>ea his, ad rebum</c:alink> facer cum. Est iudico fierent no. Tantas appetere scribentur quo id, ne eius omittantur nec. Duo at falli comprehensam. Et impedit nostrum usu, id vel timeam tincidunt intellegat.
Sint meis maiorum vix et, facilisi intellegat interesset ad nec. Quo mazim ornatus signiferumque at. Quo ei copiosae nominati, in summo debet recusabo quo. An has nullam nominavi fabellas, te ubique epicurei vix, eleifend aliquando <c:alink:http://example.com>http://example.com</c:alink>at vel. Eam et ponderum perpetua maiestatis.';