Community
    • Login

    Copy marked text

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    1 Posts 1 Posters 6.1k 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.
    • Greg HallingstadG
      Greg Hallingstad
      last edited by

      Is there way to copy only the text which is marked (matched with regex)? I can remove unmarked lines but I would like to remove the text around the marked text as well. I was thinking I could do a find and replace but I’m not sure how to do a reverse regex, as in selecting everything the regex doesn’t match. My regex skill is rather weak.

      example:
      random text and characters : 12 more random test
      more random text : 45 more random characters

      I can match the numbers 12 and 45 with (?: [0-9]+) but now I need to delete everything around the number or copy and paste the number to a different file.

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