You are here: PSPad forum > Bug report / Hlášení chyb > Search & Replace newline bug

Search & Replace newline bug

#1 Search & Replace newline bug

Posted by: vitexikora | Date: 2019-05-23 09:23 | IP: IP Logged

I am trying to fix an SVG file that, instead of newlines, have literal "\r\n" values. To fix it, I am using regex replace like '\\r\\n' -> '\n'. Only the first subsitution works, all subsequent always fail, because the editor does not expect the line of code to split (it continues replacing now empty spots where the original line used to be).

PSPad 32 5.0.1

Options: Reply | Quote | Up ^


#2 Re: Search & Replace newline bug

Posted by: vbr | Date: 2019-05-23 20:27 | IP: IP Logged

vitexikora:
I am trying to fix an SVG file that, instead of newlines, have literal "\r\n" values. To fix it, I am using regex replace like '\\r\\n' -> '\n'. Only the first subsitution works, all subsequent always fail, because the editor does not expect the line of code to split (it continues replacing now empty spots where the original line used to be).

PSPad 32 5.0.1

Hi, in thic case, you need a workaround with searching/replacing backwards:
Place th ecursor at the end of the file, in the replace dialog the Direction should be set to "backwards"
and perform the needed replacement wit newlines.

hth,
vbr

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2019 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR