View Single Post
  #3 (permalink)  
Old 03-03-04, 12:51 PM
xgab xgab is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Skeleton Man
Try this:

Code:
$code = "This<HTML>should<head>be<foo>HTML<bar>free</b>";
$code = preg_replace("/<.+?>/","",$code);

print $code;
Provided there aren't stupid things like incomplete tags ("<HTML", "<b", etc), this should be all you need to do.
Thank you for your reply.

Excuse me, I am a newbie... is your code Perl or PHP ?

It seems to be PHP...

I would need Perl code to strip html tags
Reply With Quote