How can I select text from different parts of a document.
-
I have a large file with over 3 million words. I have it in date order and want to select all parts that relate to certain subjects in the file. I have tagged every piece of information with (*1) (*2) etc. There are anything up to 300 entries for (*1) throughout the text. How can I grab every piece relating to (*1) and concentrate in one place?
-
Hello, @michael-haigh-0 and All,
Just two constraints :
-
Your
(*###)tags must begin the line OR are preceded with blank space chars only. But these tags may be followed with some text -
You must run, at least, the
v7.9.1N++ release or a later one
If so, the road map is :
-
Open your file in N++
-
Open the
Markdialog (Ctrl + M) -
SEARCH
(?s)^\h*\(\*1\).+?(?=\(\*\d+\)|\z) -
Tick the
Purge for each searchoption -
Tick the
Wrap aroundoption -
Leave all other options unticked
-
Select the
Regular expressionsearch mode -
Click on the
Mark Allbutton -
Click on the
Copy Marked Text -
Close the Mark dialog (
Esc) -
Open a new tab (
Ctrl + N) -
Paste the clipboard’s contents (
Ctrl + V)
=> Each
(*1)section is natively separated with a blank line and a----line ;-)Now, just get concentrated !
Of course, change the
1of the regex by any number required !Best Regards,
guy038
P.S. :
You may, as well :
-
Tick the
Bookmark lineoption, in the Mark dialog, before clicking on theMark Allbutton -
Close the Mark dialog (
Esc) -
Go back to the very beginning of your file (
Ctrl + Home) -
And, simply, browse through each Bookmarked line, with the
F2orShift + F2shortcuts !
-