regex to remove html tags python

49

regex to remove html tags python -

def cleanhtml(raw_html):
  cleanr = re.compile('<.*?>')
  cleantext = re.sub(cleanr, '', raw_html)
  return cleantext

Comments

Submit
0 Comments