Extract emails from html using regex

前端 未结 3 1032
无人共我
无人共我 2021-01-22 20:25

I\'m trying to extract any jabber accounts (emails) using regex from this page.

I\'ve tried using regex:

\\w+@[\\w.-]+|\\{(?:\\w+, *)+\\w+\\}@[\\w.-]+
         


        
3条回答
  •  再見小時候
    2021-01-22 21:10

    Try this one:

    reg_emails=r'^((([0-9a-zA-Z]+)[\_\.\-])*([0-9a-zA-Z]+))@((([0-9a-zA-Z]+)[\_\.\-])*([0-9a-zA-Z]+))\.((([0-9a-zA-Z]+)[\_\.\-])*([0-9a-zA-Z]+))$'
    

提交回复
热议问题