Extract email sub-strings from large document

前端 未结 11 2210
星月不相逢
星月不相逢 2020-11-28 06:54

I have a very large .txt file with hundreds of thousands of email addresses scattered throughout. They all take the format:

......
         


        
11条回答
  •  暖寄归人
    2020-11-28 07:08

    You can use \b at the end to get the correct email to define ending of the email.

    The regex

    [\w\.\-]+@[\w\-\.]+\b
    

提交回复
热议问题