Guest User

Untitled

a guest
Dec 6th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. #用正则简单过滤html的<>标签
  2. import re
  3. str = "<img /><a>srcd</a>hello</br><br/>"
  4. str = re.sub(r'</?\w+[^>]*>','',str)
  5. print str
Add Comment
Please, Sign In to add comment