Parameter to Remove line numbers from Find results



  • 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





  • 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



  • 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


Log in to reply