Created
November 30, 2019 09:01
-
-
Save sagorbrur/c62cf96c1f197e881097c51821b3db6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Removing HTML Tag from text using regex | |
# code ref: https://stackoverflow.com/questions/9662346/python-code-to-remove-html-tags-from-a-string | |
import re | |
def cleanhtml(raw_html): | |
cleanr = re.compile('<.*?>') | |
cleantext = re.sub(cleanr, '', raw_html) | |
return cleantext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment