translate \r\n
-
(There is quite a lot to search through, here, so I hope I’m not replicating an existing query with this…)
I just parsed a large (15 MB) .json file and am editing it in NPP. I wish to replace all the untranslated \r and \n codes with their equivalents: actual <CR><LF> characters, to improve the readability.
I’m trying to use the Win10 search-and-replace function, but I can’t find a way to make it accept escape codes (such as ^J, ^M, etc.) as characters to replace \r and \n.
Is there a well-known, and/or quick-and-dirty, way to achieve this?
Thanx!
-
I would use Regular expression Search mode and in the replace field simply use
\r
for carriage return and\n
for linefeed.If you want to search for untranslated versions, use
\\r
or\\n
in the find field. -
Thanx!
I’m not yet trained in the use of RegExes, but I can get there…