Community
    • Login

    How do I Search: select\copy all matches?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 11.9k 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.
    • Nick LN
      Nick L
      last edited by

      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

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS
        Scott Sumner @Nick L
        last edited by

        @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
        • Nick LN
          Nick L
          last edited by

          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?

          Scott SumnerS 1 Reply Last reply Reply Quote 0
          • Scott SumnerS
            Scott Sumner @Nick L
            last edited by

            @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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors