Remove HTML Tags

linkaiyi
Follow

use regular express to remove tags

def clean_html(raw_html):
    clean_pattern = re.compile('<.*?>') # find string parts with patterns
    clean_text = re.sub(clean_pattern, '', str(raw_html))
    return str(clean_text)
Object has 0 attachments

Was this article helpful?

This article is viewed 8 times!

Recent Viewed Articles

Related Articles

0 Comments

Leave a Comment

Support