what I want to do it to take a string out of a mysql database,and strip allhtml/ email tags that have been inserted in.
So I have text similar to
\'<a href=\"mailto:foo@foo.com\">foo@foo.com</a>\'
and I want it turn into just \'foo@foobar.com\'. Obviously the actual email addresses or web addresses will vary.
I have used eregi_replace before with success,but here the stuff that needs to be stripped or replaced will vary.(as emails vary).
With eregi edit can you use wildcards- somthing like \"<a href=\"mailto:*\"></a>?
#Ultimately what I am trying to acheive is this-
I have an \'add\' form into my database which adds special charaters, <br> lines etc.However when I pull down the record into my \'edit\' page , it also pulls down the special formatting I have done- which is fine,but when I update the record ,it parses through the process again.This results in all my urls, emails and <br> lines doubling.
So I reckoned that if I stripped them out for the editing view and then reapplied the formatting to the whole string as I update the database this wouldbe the best courseof action.
Any ideas?