Community
    • Login

    Parameter to Remove line numbers from Find results

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 4 Posters 6.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.
    • Gábor és AndiG
      Gábor és Andi
      last edited by

      I am browsing large text files (logs) with Notepad++.
      When I search (CTRL+F) for a word (eg. “error”) N++ generates a Find result, where the line numbers are always present. These
      numbers have different identication depending on the length of line number.
      Line 9: ERROR MESSAGE: 0025 0000 abcd 0000 00 00 0000 CC42 0000
      Line 63: ERROR MESSAGE: 0026 0000 abcd 0000 00 00 0000 CE34 0000
      Line 101: ERROR MESSAGE: 002A 0000 abcd 0000 00 00 0000 CC42 0000
      Line 1209: ERROR MESSAGE: 009A 0000 abcd 0000 00 00 0000 CBB8 0000
      When I copy this to another text file, I have to manually remove this unnecessary information, to get the useful data.
      Would it be possible to implement a parameter to N++, like “Show line numbers in Find result” becomes optional?

      Thank you.
      Gabor

      Scott SumnerS 1 Reply Last reply Reply Quote 0
      • Scott SumnerS
        Scott Sumner @Gábor és Andi
        last edited by

        @Gábor-és-Andi

        Check out this posting, maybe it will help you: https://notepad-plus-plus.org/community/topic/10436/containing-line-numbers-from-find-window-not-copied-anymore/2

        1 Reply Last reply Reply Quote 0
        • 古旮古
          古旮
          last edited by

          Donno about config, but using regex could be a solution.
          Copy all the Find result to a new window

          Line 9: ERROR MESSAGE: 0025 0000 abcd 0000 00 00 0000 CC42 0000
          Line 63: ERROR MESSAGE: 0026 0000 abcd 0000 00 00 0000 CE34 0000
          Line 101: ERROR MESSAGE: 002A 0000 abcd 0000 00 00 0000 CC42 0000
          Line 1209: ERROR MESSAGE: 009A 0000 abcd 0000 00 00 0000 CBB8 0000

          Then press ctrl+H, Finid What: ^[^:]*:, Replace With: <empty string>.
          Then you get:

          ERROR MESSAGE: 0025 0000 abcd 0000 00 00 0000 CC42 0000
          ERROR MESSAGE: 0026 0000 abcd 0000 00 00 0000 CE34 0000
          ERROR MESSAGE: 002A 0000 abcd 0000 00 00 0000 CC42 0000
          ERROR MESSAGE: 009A 0000 abcd 0000 00 00 0000 CBB8 0000

          1 Reply Last reply Reply Quote 0
          • cmeriauxC
            cmeriaux
            last edited by

            Guys, it’s already implemented
            Do a right click and use “copy” built-in function.
            It’s different that “select all” and “copy” with accelerator key

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