Skip to content

Instantly share code, notes, and snippets.

@Keda87
Created February 23, 2018 09:38
Show Gist options
  • Save Keda87/b5e6e26dadadcd384a8fb73529186f9a to your computer and use it in GitHub Desktop.
Save Keda87/b5e6e26dadadcd384a8fb73529186f9a to your computer and use it in GitHub Desktop.
Clean up html tags within text
def clean_html(content):
import re
TAG_RE = re.compile(r'<[^>]+>')
return TAG_RE.sub('', content).strip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment