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 !
-
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