You are here: PSPad forum > English discussion forum > Search and replace with <del> key
Posted by: Neil | Date: 2019-05-08 23:21 | IP: IP Logged
Hi Jan (or anyone),
Do you know how I can replace a found string with a "delete" key stroke?
I have a file where long text strings are broken onto a new line with a "$" at the end of the broken line.
I want to find all the "$"s and delete them such that the lines are joined again.
Thanks,
Neil
--
Neil
Posted by: gwinkless | Date: 2019-05-09 14:56 | IP: IP Logged
PHReplace might help.
Edited 1 time(s). Last edit at 2019-05-09 14:57 by gwinkless.
Posted by: Neil | Date: 2019-05-11 11:47 | IP: IP Logged
gwinkless:PHReplace might help.
Hi
Thanks for suggestion but that appears to have the same functionality as PSPad search and replace (except extra for multi line strings)
I want to be able to Find the "$" text and Replace with a <delete> such that split lines are joined again onto one line.
--
Neil
Posted by: Neil | Date: 2019-05-12 05:46 | IP: IP Logged
Hi Jan,
I found a solution on another forum.
Using the editor TextPad I do a search for:
/$/n
which as you would know is a literal "$" followed by line return.
I replace this with:
<blank>
and the lines are rejoined.
I tried this in PSPad but it cannot find "/$/n"
Any suggestions ??
Thanks,
--
Neil
Posted by: pspad | Date: 2019-05-12 08:48 | IP: IP Logged
Internal Search/Replace does line by line search. It can't eliminate line ends
Wat you can do is switch view to HEX mode and do search/Replace there.
Find your string, replace with nothing and switch back to text mode
Posted by: Vany | Date: 2019-05-14 11:19 | IP: IP Logged
Neil:gwinkless:PHReplace might help.Hi
Thanks for suggestion but that appears to have the same functionality as PSPad search and replace (except extra for multi line strings)
I want to be able to Find the "$" text and Replace with a <delete> such that split lines are joined again onto one line.
but it works well for the case you've described
search for: "[$]$\r\n" (in case, you use DOS line ends)
replace with: " " (space)
use regular expression: checked
--
Vany
(PSPad 5.5.1.790 x32, W10h/p x64 en/cs)
Posted by: Neil | Date: 2019-05-22 03:49 | IP: IP Logged
Vany:but it works well for the case you've described
search for: "[$]$\r\n" (in case, you use DOS line ends)
replace with: " " (space)
use regular expression: checked
Hi Vany,
Sorry - I must be missing something.
I type "[$]$\r\n" into find box (with regular expression checked) and nothing found.
I am using just a plain .txt file
Cheers,
--
Neil
Posted by: Vany | Date: 2019-05-23 07:12 | IP: IP Logged
do you really use the PHReplace ?
--
Vany
(PSPad 5.5.1.790 x32, W10h/p x64 en/cs)
Editor PSPad - freeware editor, © 2001 - 2023 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR