Regular expression to match closing HTML tags

前端 未结 4 1666
清歌不尽
清歌不尽 2020-12-10 08:33

I\'m working on a small Python script to clean up HTML documents. It works by accepting a list of tags to KEEP and then parsing through the HTML code trashing tags that are

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 08:49

    You may also consider using the html parser that is built into python (Documentation for Python 2 and Python 3)

    This will help you home in on the specific area of the HTML Document you would like to work on - and use regular expressions on it.

提交回复
热议问题