Community
    • Login

    Marking text with Regex and copy-paste it

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 492 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.
    • Abdullah EksiogluA
      Abdullah Eksioglu
      last edited by

      I have seen a few post about it but none of them seems to be a solution for me.
      Trying to copy all text in between specific words and paste them into a new notebook. I am using word1((?s:.*?))Word2 regex and it works well, later i can able to mark all my required text. When i am trying to select all text with Search>Bookmark>Copy Booknmarked Lines as only the first line of the each mark is selected.
      Like i cannot copy text in between "<between1>-<between2> with mark all method.
      Keeping find-replace also canbe a solution but i don’t know a way to do it.

      <between1>aaassassca
      sssasc
      sc
      sssasc
      sssasc

      ssscsd

      <between2>aaa ff fd d
      fff d
      fvbddfb
      f f d
      ffd

      <between1> csdcsc
      dfvdf
      dfv fdfv
      dfvdfvf

      dvfdffvd

      <between2>

      1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn
        last edited by

        @Abdullah-Eksioglu said in Marking text with Regex and copy-paste it:

        Booknmarked Lines as only the first line of the each mark is selected

        Not exactly sure I understand but Notepad++ 7.8 adds a new feature to bookmark ALL lines of a multiline match, not only the first line.

        If you want to copy marked text, unfortunately that is still not possible with Notepad++. But see https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6095

        1 Reply Last reply Reply Quote 3
        • Abdullah EksiogluA
          Abdullah Eksioglu
          last edited by

          Thank you Alan. I see that no quick solution to copy all marked text, i tried Scott Sumner solution and it works fine.

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