Hi, All,
From the @pellelin’s post, here is an improvement of my previous post : I now added the complete path of each file , followed with a \ character and the file name !
Once any Search Results panel is displayed :
Hit the Ctrl + A shortcut
Hit the Ctrl + C shortcut
Open a new tab ( Ctrl + N )
Paste the Search Results contents in this new tab ( Ctrl + V )
Run the option Edit > Line operations > Reverse line order ( IMPORTANT )
Now, open the Replace dialog ( Ctrl + H )
Uncheck all box options
FIND (?-si)^\tLine\x20+(\d+)(?=(?s:.+?)^\x20\x20(\u:.*\\.+)(?=\x20\())|^\x20\x20\u.+\R
REPLACE ?2\2\t\1\t
Check the Wrap around option
Select the Regular expression search mode
Click on the Replace All button
Now, re-run the Edit > Line operations > Reverse line order option ( IMPORTANT )
Finally, save this new tab for future study within N++ or Excel !
Now, @pellelin, if you don’t have already the Columns++ plugin installed in your configuration, I kindly advice you to install it !
After installation of this plugin, close and re-open Notepad++
First, run the Plugins > Columns++ > Elastic tabstops option
Then run the Plugins > Columns++ > Convert tabs to spaces option
Now, in order to right-aligned the line numbers, do the following regex replacement :
FIND (\d+)(\x20*)(?=\x20:\x20)
REPLACE \2\1
With the same parameters, in the Replace dialog, than above !
For example, I did a search of the word the, whatever its case, in Normal mode, on any .txt file of an USB key
Search "the" (77312 hits in 507 files of 590 searched) [Normal]
I got an INPUT file of 51,5544 lines for about 10,2 Mb
And, after the above process :
Reverse line order
Regex Replacement
Reverse line order
Which took 82s, I got an OUTPUT file of 51,047 lines, for about 12,2 Mb, with Complete file path, Line number and Text, all aligned
[image: 1780319031552-b25954ec-283c-4b15-9603-bf0d370d3c2d-image.jpeg]
Best Regards,
guy038
P.S. :
In this version, I didn’t report the number of hits. If this information matters too, just ask me about it !