Here is a code snippet to strip tags and leading and trailing whitespace
def remove_html_tags text): """Remove html tags from a string""" clean = re.compile('<.*?>') ntxt = re.sub(clean, '', text ) return ntxt.strip()
Howto's, Observations, and stuff
Here is a code snippet to strip tags and leading and trailing whitespace
def remove_html_tags text): """Remove html tags from a string""" clean = re.compile('<.*?>') ntxt = re.sub(clean, '', text ) return ntxt.strip()