Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 402 Views 1 Watching
    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.
    • Michael Haigh 0M Offline
      Michael Haigh 0
      last edited by

      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
      • guy038G Offline
        guy038
        last edited by guy038

        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

        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
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors