• Login
Community
  • Login

How do I Search: select\copy all matches?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 12.0k 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.
  • N
    Nick L
    last edited by Feb 9, 2017, 2:43 PM

    I REALLY want to use the find (using regex) to search for particular strings, then simply select the results. Right now I’m having to mess around with horribly elaborate regex which basically finds everything I DONT WANT, and then replace it with null characters(deleting), leaving only the strings i want behind.

    THere must be a simpler way!?!?!? YOu can mark your results, but you cant select! YOu really should be able to! I thought this would be a given?? Maybe this this can also double as a feature request (=select marked results?), But i’m annoyed a suite like NOtepad++ cant do this nicely\intuitively. Any ideas apart from negated regex (which regex is famously BAD at).

    Thanks

    S 1 Reply Last reply Feb 9, 2017, 3:00 PM Reply Quote 0
    • S
      Scott Sumner @Nick L
      last edited by Feb 9, 2017, 3:00 PM

      @Nick-L

      There are some solutions to this type of problem here: https://notepad-plus-plus.org/community/topic/12710/marked-text-manipulation/

      1 Reply Last reply Reply Quote 0
      • N
        Nick L
        last edited by Feb 9, 2017, 4:38 PM

        Yes Ive read that one and the ‘bookmark lines’ doesnt work as its not the whole line that i want, but a string matching my regex.

        And as mentioned, having to fiddle with overly complicated regex negation script just seems way too time consuming, but is what I have so far been force to do. I was sure there is a better way/ hidden macro\plugin that would do what i want?

        S 1 Reply Last reply Feb 9, 2017, 4:56 PM Reply Quote 0
        • S
          Scott Sumner @Nick L
          last edited by Feb 9, 2017, 4:56 PM

          @Nick-L

          I don’t think you read the other thread closely enough. In there is a Pythonscript method (by me) for copying only redmarked text, as well as a regular-expression method for producing only the matched text from a regex search in a document. The regex method is destructive, so if you need the original text, I suggest you make a backup copy first.

          I would forget the “negated regex” method…blech! :-)

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