• Login
Community
  • Login

Select multiple words / Copy multiple words

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 3 Posters 1.6k 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.
  • V
    Vasile Caraus
    last edited by Aug 26, 2018, 6:25 AM

    hello, I have a text with lot of email adresses. With a simple regex I manage to find each of emails. But how can I select those multiple email and copy it all of ones?

    I believe this should be an important feature !

    S 1 Reply Last reply Aug 26, 2018, 12:55 PM Reply Quote 0
    • S
      Scott Sumner @Vasile Caraus
      last edited by Aug 26, 2018, 12:55 PM

      @Vasile-Caraus

      …how can I select those multiple email and copy it all…?

      You can’t do it directly, but this thread gives some ideas on how it can be accomplished.

      1 Reply Last reply Reply Quote 1
      • T
        Terry R
        last edited by Aug 26, 2018, 8:01 PM

        I have an idea, a small amount of testing suggests this could work. Instead of searching for email addresses, look for all the other words. That is to say look for any word which does NOT have an '@ in it. Remove all those and you would be left with what you wanted. You would need to make sure you do not save the result in the current file as that would then change it. But you could easily copy what’s left into a new file.

        So my regex is
        Find what: \s[^@]+\s
        Replace with: ,

        I’ve used the , to delimit the results, you could replace that with anything else you wished.

        Terry

        S 1 Reply Last reply Aug 26, 2018, 8:12 PM Reply Quote 2
        • S
          Scott Sumner @Terry R
          last edited by Aug 26, 2018, 8:12 PM

          @Terry-R

          I think your idea was covered in the thread I pointed to earlier…see where @guy038 in that thread says:

          SEARCH (?s)^.*?(Your regex to match)|(?s).*\z
          REPLACE…etc

          Like your recent suggestion, that is a destructive search, which may be a downside, although a simple Undo can take care of that after the resultant data is Copy’d out…

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