Copy marked text
-
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 charactersI 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.
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