View Single Post
Old 11-01-2009, 09:11 PM   #4 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

Your regexp is far too greedy, if there's multiple occurences, you might find that it strips them all out and everything in between. Something like the following (untested) may work;

php Code:
$the_content = preg_replace('#(<a[^href]+href[^>]+>)<acronym[^>]+>([^<]+)</acronym></a>#', '$1$2</a>', $the_content);
delayedinsanity is offline  
Reply With Quote
The Following User Says Thank You to delayedinsanity For This Useful Post:
unitechy (11-02-2009)