[eluser]BobbyB[/eluser]
Hi,
my urls(in a string) look like this:
Code:
<a href="http://bit.ly/ddGgAi" class="twitter_news_links" target="_blank">http://bit.ly/ddGgAi</a>
I am trying to change them all to:
Code:
<a href="http://bit.ly/ddGgAi" class="twitter_news_links tips" term="http://bit.ly/ddGgAi" target="_blank">http://bit.ly/ddGgAi</a>
So I need to add a class name and the "term" Attribute which is supposed to be the same as "href".
How would you do this?
I have been playing around with regex/preg_replace but couldn't come up with a solution.
Any help is appreciated.