Skip to content

Instantly share code, notes, and snippets.

@pyshift
pyshift / re.py
Created April 29, 2014 16:39 — forked from dervn/re.py
#用正则简单过滤html的<>标签
import re
str = "<img /><a>srcd</a>hello</br><br/>"
str = re.sub(r'</?\w+[^>]*>','',str)
print str