2013年1月15日

Strip HTML tags using Python

摘要: Strip HTML tags using PythonWe often need to strip HTML tags from string (or HTML source). I usually do it using a simple regular expression in Python. Here is my function to strip HTML tags:def remove_html_tags(data):p = re.compile(r'<.*?>')return p.sub('', data)Here is anothe 阅读全文

posted @ 2013-01-15 16:29 misoag 阅读(232) 评论(0) 推荐(0) 编辑

导航