You are here: PSPad forum > English discussion forum > Replace the carriage return
Posted by: André | Date: 2010-10-24 17:06 | IP: IP Logged
Hello together!
In PSPad I want to replace the carriage return (new line sign) into an other sign (the #), so that the hole text is written in one line and the former lines are separated by the # sign.
What sign should I choose for the 'search' field?
Thank you,
André
Posted by: André | Date: 2010-10-24 18:51 | IP: IP Logged
...and one notice:
If I inscribe \n in 'search', it has no function - "'\n' was not found".
Posted by: vbr | Date: 2010-10-24 20:40 | IP: IP Logged
André:...and one notice:If I inscribe \n in 'search', it has no function - "'\n' was not found".
Unfortunately, PSPad doesn't support this currently - line endings cannot be replaced via search and replace function.
There is a script phReplace for this
forum.pspad.com
which might work for you,
or you can work around this by first adding the separator "#" at the end of the lines (add text to lines: Alt+I) or regexp replace:
$
with:
#
And then call Edit: Lines manipulation: Join lines
(the line endins are replaced with a space using this function).
vbr
Posted by: André | Date: 2010-10-25 15:14 | IP: IP Logged
Hello vbr!
Thank you very much! This is the function I was looking for.
vbr:And then call Edit: Lines manipulation: Join lines
(the line endins are replaced with a space using this function).
André
Posted by: behd | Date: 2013-06-18 10:01 | IP: IP Logged
Is there a way now to replace carriage return from text ?
I'm using it quite frequently to craft fast & stupid SQL queries from Excel.
(but for the moment I'm still forced to keep a notepad++ installed to do it)
Thanks !
Posted by: Freeman | Date: 2013-06-20 07:14 | IP: IP Logged
André:In PSPad I want to replace the carriage return (new line sign) into an other sign (the #)
Replace $ → #, then select required text and go to Edit → Line Manipulation → Join Lines, then use Remove Redundant Spaces if needed.
Posted by: behd | Date: 2013-06-20 08:42 | IP: IP Logged
ok I was hoping that there would be a faster solution since then...
(read: directly replacing the carriage return, either by regexp or special character as in UltraEdit)...
But thanks for answer.
Edited 1 time(s). Last edit at 2013-06-20 08:43 by behd.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR