Regular expression captures all the data I am looking for but how can I copy that data?
I have used a regular expression that captures all the data I need but I am looking for a simple way to copy or cut just that data to be used in a compare later.
@ken-shaw my company does not let me add any plugins
If you use the Mark tab of the Find/Replace/…/Mark dialog, check the Bookmark Line option and do the marking (search), then it will bookmark all matched lines. You can then use Search > Bookmark > Cut/Copy Bookmarked Lines to grab all those lines into the clipboard.
used a regular expression that captures all the data I need but I am looking for a simple way to copy or cut just that data
“captures”… Hmm, I presume you mean you have used the Mark function (and thus it is “captured” in red background) or you have the matching lines in the Search results window…
“cut” is not possible; you’d have to change your regular expression to be a replacement op where you replace matches with nothing.
If you need “whole line” data for what you’re doing, in addition to Peter’s method you could copy the line data from the Search results window (if that’s where you have it).
If you have text red-marked, you could press this button:
But without more specific info about what you have/need, it is hard to give the best advice.
I can mark and copy lines without issue but what I want is the specific text/data from my regular expression:
<book category=“COOKING”><title lang=“en”>Everyday Italian</title><author>Giada De Laurentiis</author><year>2005</year><price>30.00</price></book>
<book category=“CHILDREN”><title lang=“en”>Harry Potter</title><author>J K. Rowling</author><year>2005</year><price>29.99</price></book>
<book category=“WEB”><title lang=“en”>Learning XML</title><author>Erik T. Ray</author><year>2003</year><price>39.95</price</book>
I use mark with the following regular expression:
I see that the text/data I want is highlighted so I want to only copy that highlighted data not the whole line of data.
It seems like there should be a simple copy highlighted text but I don’t see it.
Also the version I have at work is 7.8.5 so what version is that copy marked text in as that would be freaking awesome
Also the version I have at work is 7.8.5 so what version is that copy marked text in
You’re using v7.8.5? The Copy Marked Text feature in the Mark dialog was added in v7.9.1. If you want this feature at work, you are going to have to ask your IT to approve a newer version of Notepad++, because v7.8.5 does not have the functionality you desire.
I highly recommend v8.4.1 if you are upgrading, because there have been significant improvements, and v8.4.1 has been very stable. (And since you don’t use plugins, you do not have to worry about the updated plugin interface, which is the thing holding back many users from upgrading beyond v8.2.1, while they wait for their needed plugins to be made compatible with Notepad++.)
Woot my company installed the latest version of NotePad ++ so very happy