• Login
Community
  • Login

How can I select text from different parts of a document.

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 225 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    Michael Haigh 0
    last edited by Feb 22, 2021, 10:13 AM

    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?

    1 Reply Last reply Reply Quote 0
    • G
      guy038
      last edited by guy038 Feb 22, 2021, 1:23 PM Feb 22, 2021, 12:13 PM

      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.1 N++ release or a later one


      If so, the road map is :

      • Open your file in N++

      • Open the Mark dialog ( Ctrl + M )

      • SEARCH (?s)^\h*\(\*1\).+?(?=\(\*\d+\)|\z)

      • Tick the Purge for each search option

      • Tick the Wrap around option

      • Leave all other options unticked

      • Select the Regular expression search mode

      • Click on the Mark All button

      • 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 1 of the regex by any number required !

      Best Regards,

      guy038

      P.S. :

      You may, as well :

      • Tick the Bookmark line option, in the Mark dialog, before clicking on the Mark All button

      • 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 F2 or Shift + F2 shortcuts !

      1 Reply Last reply Reply Quote 2
      1 out of 2
      • First post
        1/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors