@stOK Which suggestions have been crap?, all my 'suggestions' have worked perfectly, its up to the OP to use my 'suggestions' appropriatly, I suggest you reread the thread/OP's posts.
The last crap was $content = preg_replace('~<(a.*)href=(.*?)>(.*)</a>~i', '$3', $content); Code (markup): try it on the following string $content = '<a href="http://www.google.com/">google</a> and <a href="http://www.moogle.com/">moogle</a>'; or $content = '<acronym>AAA</acronym> Whole Page of very useful info <a href="link">link</a>'; ...and many many more issues.... rtfm
The regex may not be effective, but what the OP asked for is for the link text to remain... From your post I can identify 1 flaw: $content = preg_replace('~<(a.*)href=(.*?)>(.*)</a>~i', '$3', $content); Which can interfer with other tags containing a. On that basis yes I'll admit you got me - but don't call my suggestions crappy - that way you'll never progress - what would have been better is something constructive.
Okay so I switched over to.... $content = preg_replace('%</?a\b[^>]*>%i', '', $content); PHP: Will the $3 also work in this strip of code? Now what would I use to have it remove the non a href link http://www.google.com? (The forum makes this a link automatically) Thanks a ton. I really appreciate it.
@ dan & stOK - You are actually both wrong with it. The (.*) means $3 will leave everything between the first <a tag and the final </a> tag. Either way, arguing about it really is of no benefit to anyone so I don't know why you are really @smashedpumpkins - Take a look at http://regexlib.com/ for some example regex's for stripping url's