Copy marked text sections
-
I need to copy text sections
How can I do that?
Example:
[https://postimg.org/image/yxg1sjwlh/](need to copy all red marks) -
The best method I’ve found is by using a Pythonscript. See this thread: https://notepad-plus-plus.org/community/topic/12710/marked-text-manipulation
-
Thanks, it works!
-
Hello @dumpling-dumpling and All,
An alternative to the Scott’s Python script could be a regex S/R, built that way :
SEARCH :
(?s).*?(Your Regex)|.*REPLACE
\1\r\nIn your case, the correct regex S/R would be :
SEARCH
(?s).*?('.')|.*REPLACE
\1\r\n-
First, copy your file in a new tab
-
Open the Replace dialog (
Ctrl + H) -
Enter the Search and Replace regexex
-
Tick the
Wrap aroundoption -
Click on the
Replace Allbutton
Et voilà !
So, with the given text, below :
<name = 'A' level = '1'> <name = 'b' level = '2'> <name = 'C' level = '3'> <name = 'D' level = '4'> <name = 'E' level = '5'>You would obtain :
'A' '1' 'b' '2' 'C' '3' 'D' '4' 'E' '5'Cheers,
guy038
-
-
-
@nick-tsangaris said in Copy marked text sections:
Can confirm this works without modification in May 2022. Thanks @guy038 for the easy copy and paste!
Well, now there’s a better way to copy marked text:
The
Copy Marked Textcommand button didn’t exist when this thread was created.
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