I have a part of HTML source file that contains strings that I want to select and copy at once, using the regex functionality of Notepad++.
Here is a part of the text source:
<option value="Performance" >Performance</option> <option value="Maintenance" >Maintenance</option> <option value="System Stability" >System Stability</option>
I'm using the regex "[0-9a-zA-Z ]*"
to search the "value" values. I have also selected the feature in Notepad++ search to highlight/mark the found text. This working fine I now want to copy or cut only the highlighted text to clipboard for further processing. But I'm not able to find this functionality in Notepad++. Is this simply not possible or am I too dumb?
1 Answer. Show activity on this post. Total 2 lines were bookmarked. now go to "search" menu > bookmark > copy bookmarked line.
From the NotePad tab, select the cell of information you want to cut or copy. To cut the information, click Cut on the speedbar. To copy the information in the cell, click Copy on the speedbar. Select the cell where you want to paste the information.
Place your cursor at the beginning position where you want to begin selecting text. Press and hold the “Shift” and “Alt” keys on your keyboard. Continue holding “Shift” and “Alt” while using the “Down” and “Right” arrow keys on your keyboard to select the text as desired.
As of Notepad++ 5.9 they added a feature to 'Remove Unmarked Lines' which can be used to strip away everything that you don't want along with some search and replaces for the other text on each value line.
You can also do a similar thing using Search-->Bookmark-->Copy Bookmarked Lines
So technically you still cannot copy marked text, but you can bookmark lines with marked text and then perform various operations on bookmarked or unmarked lines.
I am adding this for completeness as this post hits high in Google search results.
You can actually copy all from a regex search, just not in one step.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With