MKozlov
10/6/2017 - 6:22 AM

Strip tags with regex

Strip tags with regex

import re

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