RegEx domain extraction
-
Hello, i have a very large list of emails, and lots of them are some kind of “dummy emails” so i want to bookmark only domains that i choose, .com .net .org and so on…
Example like this:
zBA@GAD.o
J@jjYe.o
dr@-Dv.L
email@gmail.com
qR@Mx.L1x.t
lNCE@2.GJ
g@VF.yr
h6-6@xkR.O
email2@somedomain.net
rVE1@v.1sP
email3@somedomain.org
W@7…KM1ZgI tried every regex i could find on internet but for this situation nothing worked.
Tried something like :
(\b[A-Za-z0-9._%±]+@[A-Za-z0-9.-]+[(.eu|.com|.org|.ba)]{2,4}\b)
but nothing.
Please help -
Hello, @stefan-ralic, and All,
Why not this simple regex, which select the complete e-mail address, with its line-break
^.+@.+\.(eu|com|org|net|ba)\R
Refer to :
https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
and , more specifically to :
https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Original_top-level_domains
https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
Best Regards,
guy038
-
@guy038 this did the trick :) Thank you so much… I tried that already but now i see i was missing ) so no wonder it didn’t work. Thanks again. Best regards