Re: Remove HTML tags (except anchor tag) from a string using regular expressions
From: Anand (abpillai_at_gmail.com)
Date: 02/01/05
- Next message: Steve Holden: "Re: Advice on OSX cocoa app with Python backend"
- Previous message: Roy Smith: "Re: equivelant of Java's toString() method? (not repr)"
- In reply to: Anand: "Re: Remove HTML tags (except anchor tag) from a string using regular expressions"
- Next in thread: Max M: "Re: Remove HTML tags (except anchor tag) from a string using regular expressions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Steve Holden: "Re: Advice on OSX cocoa app with Python backend"
- Previous message: Roy Smith: "Re: equivelant of Java's toString() method? (not repr)"
- In reply to: Anand: "Re: Remove HTML tags (except anchor tag) from a string using regular expressions"
- Next in thread: Max M: "Re: Remove HTML tags (except anchor tag) from a string using regular expressions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Loading