Community
    • Login

    RegEx domain extraction

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 766 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Stefan RalicS
      Stefan Ralic
      last edited by

      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…KM1Zg

      I 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

      1 Reply Last reply Reply Quote 0
      • guy038G
        guy038
        last edited by

        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

        Stefan RalicS 1 Reply Last reply Reply Quote 4
        • Stefan RalicS
          Stefan Ralic @guy038
          last edited by

          @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

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors