regex - using python, Remove HTML tags/formatting from a string -
I have a string that contains links, bold text, such as html markup.
I want to strip all tags so that I have raw text.
What is the best way to do this? Regex?
If you are going to use regex:
import Re-def strips (data): p = re.compile (r '& lt;. *? & Gt;') Return p.sub ('', data) & gt; & Gt; & Gt; Stripele ('
Comments
Post a Comment