Posted on 2002-06-14
I am writing a Perl script that should strip HTML tags from a large string and substitute a space for them. Currently I am using the following command to do this:
$respstr =~ s/(<.*>)/ /g;
This strips anything between < and >. Unfortunately, this strips most of the HTML since the entire page is enclosed between < and >. I need to strip anything between < and > exclusive of content contain < or >. How can I modify the above code to do this?
Thanks for your help.