Re: Remove HTML tags (except anchor tag) from a string using regular expressions

From: Anand (abpillai_at_gmail.com)
Date: 02/01/05


Date: 1 Feb 2005 05:27:05 -0800

I meant
content = re.sub ('<[^!(a>)]([^>]|\n)*[^!(/a)]>', '', content)

Sorry for the mistake.
However this seems to also print tags like <b>, <p> etc
also.

-Anand


Loading