Issue with Regular expressions in python

前端 未结 6 916
轮回少年
轮回少年 2021-01-21 20:59

Ok, so i\'m working on a regular expression to search out all the header information in a site.

I\'ve compiled the regular expression:

regex = re.compile         


        
6条回答
  •  攒了一身酷
    2021-01-21 21:26

    This question has been asked in several forms over the last few days, so I'm going to say this very clearly.

    Q: How do I parse HTML with Regular Expressions?

    A: Please Don't.

    Use BeautifulSoup, html5lib or lxml.html. Please.

提交回复
热议问题