Community
    • Login

    RegEx domain extraction

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 1.4k 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 Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors