New displaying of the "Search Results" panel
-
Hello, All,
One minor drawback, when you display the
Search resultspanel, is that the name of each file does not appear before the line number and the line itself !See, for example, this post : https://community.notepad-plus-plus.org/topic/21722/format-of-search-results
Here is the way to realize this goal !
Once any
Search Resultspanel is displayed :-
Hit the
Ctrl + Ashortcut -
Hit the
Ctrl + Cshortcut -
Open a new tab (
Ctrl + N) -
Paste the
Search Resultscontents 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\u.+\R -
REPLACE
?2\2\t\1\t -
Check the ‘Wrap around’ option
-
Select the
Regular expressionsearch mode -
Click on the
Replace Allbutton -
Now, re-run the
Edit > Line operations > Reverse line orderoption ( IMPORTANT ) -
Finally, save this new tab for future study within N++ or Excel !
For a more appealing presentation within N++, if you have the
Columns++plugin, do the following actions :-
Check the
Elastic tabstopsoption -
Run the
Convert tabs to spacesoption
For example, I did a search of the word
the, whatever its case, inNormalmode, on any.txtfile af anUSBkeySearch "the" (76665 hits in 498 files of 578 searched) [Normal]I got an INPUT file of
51,224lines for about10,2 MbAnd, after the above process :
-
Reverse line order
-
Regex Replacement
-
Reverse line order
Which took
66s, I got an OUTPUT file of50,713lines, for about12 Mb, with filename, number and text alignedAnd in order to right-aligned the line numbers, do the following regex replacement :
FIND
(\d+)(\x20*)(?=\x20:\x20)REPLACE
\2\1Voila !
Best Regards,
guy038
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login