• Login
Community
  • Login

Parameter to Remove line numbers from Find results

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 4 Posters 6.1k 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
    Gábor és Andi
    last edited by Dec 5, 2016, 1:30 PM

    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

    S 1 Reply Last reply Dec 5, 2016, 1:34 PM Reply Quote 0
    • S
      Scott Sumner @Gábor és Andi
      last edited by Dec 5, 2016, 1:34 PM

      @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 Dec 5, 2016, 4:18 PM

        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
        • C
          cmeriaux
          last edited by Dec 5, 2016, 6:02 PM

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