I have a very large .txt file with hundreds of thousands of email addresses scattered throughout. They all take the format:
......
>
import re
rgx = r'(?:\.?)([\w\-_+#~!$&\'\.]+(?
Please don't hate me for having a go at this infamous regex. The regex works for a decent portion of email addresses shown below. I mostly used this as my basis for the valid chars in an email address.
Feel free to play around with it here
I also made a variation where the regex captures emails like name at example.com
(?:\.?)([\w\-_+#~!$&\'\.]+(?