1

If I search for a specific word in Notepad++ using "Find All in Current Document", the results include "Line #". I need to find a way to stop Notepad++ adding these "Line #" as I only need the actual line content.

For example, if I search for "pizza" lines, the results will be:

Line 2365: pizza
Line 5654: pizza

I don't want it telling me the lines, as they are not important right now.

How can I disable this? Or, is there a way to copy the lines I asked the software to find, ignoring the "Line #"?

5 Answers 5

0

I don't know if you can disable the linenumbers (my guess is you can't), but in the search result pane you can use block select to copy the lines.

Just put your cursor at the beginning of your first search result and use combinations of [Alt]+[Shift] and arrow keys to make a selection.

You can then copy only the selection and paste it into a new document.

5
  • An alternative would ofcourse be to copy the entire results and use block select after pasting it in a new document to delete the line number parts.
    – R-D
    Sep 22, 2014 at 19:27
  • 1
    It worked, but I had to do it in a different way. I had to point the mouse from the largest line's end and push it back using ALT + Shift + left/up/down keys. If you do it from shorter lines, it won't cover the bigger ones. Thank you very much.
    – Zerone
    Sep 22, 2014 at 19:42
  • If this answer worked, and no better answers are coming in the next few days, you should click the checkmark next to it to let other users know this answer is accepted by you as answering your question.
    – R-D
    Sep 22, 2014 at 19:45
  • How can I give you reputation ^^'? I'm newbie+. Or do you receive it automatically, somehow?
    – Zerone
    Sep 22, 2014 at 19:46
  • You should take the tour, see superuser.com/tour
    – R-D
    Sep 22, 2014 at 19:47
0

Notepad++ has a plugin named Linefilter2:

  1. It has two search modes: normal and regular expressions
  2. Search results are shown in a new text window whose results don't contain line numbers

You can see the process in the pictures below:

screenshot 1

screenshot 2

0

You can simply use the Find Next option. It will highlight the position of the occurrence of the word.

enter image description here

1
  • There are over 1000 lines, and actually I'm not looking to copy specific words, but the whole lines including that word. But I managed to do it, thanks.
    – Zerone
    Sep 22, 2014 at 19:45
0

You can work around it by copying the lines out of the search result box into a new file, then getting rid of them as follows: search for the regular expression \tLine [\d]*: (with a space after the colon) and replace it with nothing.

2
  • Where can he do it? How this adds extra information to the existing answers? Jan 10, 2017 at 21:23
  • I edited to clarify.
    – Noumenon
    Jan 10, 2017 at 21:26
0

If you mark and copy the content in the find panel using the context menu (right-click), you get a copy without the line numbers.

In the context menu (in the find result panel) first choose «Select all», then choose "Copy" in the same menu (NB! You cannot use Ctrl+C here, then you get the line numbers too). Paste the result wherever you want it.

This even works for searching in all open files at the same time (it leaves out the text about numbers of hits and the number of files with hits).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .