@patrick-o-beirne said in How to copy as extended, eg CRLF to \r\n:
I want text with the extended notation which I can edit.
I’ve found a method for this, with 8.4.2 software, but it is definitely not specific to this version (just documenting which version I used):
select some multi-line data
press Ctrl+f to bring up the Find window
select a Search mode of Normal
run a Find All in Current Document search
Note that the Find what field now (post-search) contains text in “extended notation”, which may be copied elsewhere and edited. Note also that the Search mode has been changed to Extended.
Example:
Start with this text:
456
abc
123
def
Select text as follows:
1fc0c11f-dffc-4944-845f-85af99617ead-image.png
Press Ctrl+f. Set up this search (important – don’t change what was auto-populated into Find what):
2fc7996e-d8a4-4428-aaec-8ce73b77c587-image.png
Press the Find All in Current Document button and see how the Find what box content has changed:
74f0195b-417c-4126-8de6-f72340aa9e89-image.png
The Find what box data can now be copied elsewhere and edited, as it is now abc\r\n123\r\n.
Note also that the Search mode has been changed to Extended.
BUG:
Repeat the experiment, but this time change the Search mode to Regular expression and change one character in the Find what data to a . before running the Find All in Current Document search:
8f8d7cfe-846b-4e4a-9de1-b6e27199cfb8-image.png
The result of the search: no matches.
45a83617-4866-408a-a792-b86a8a5db8d6-image.png
There should be 1 match. :-(
This happens because Notepad++ changes my search from a Regular expression search to an Extended search, before the search happens. :-(
For more info, see https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11847.