You are here: PSPad forum > Bug report / Hlášení chyb > Find&Replace, replacing newline.

Find&Replace, replacing newline.

#1 Find&Replace, replacing newline.

Posted by: Zereges | Date: 2014-09-01 00:10 | IP: IP Logged

Basicly, using Find&Replace feature to replace substring to newline (\n) produces weird behaviour while "Prompt Each Replace" option is checked.

How to reproduce:
- Start PSPad. (4.5.7.2450)
- Paste any text with delimiters. (Text1;Text2;Text3;Text4;Text5)
- Get back to start of the file
- Press CTRL-H
- Type delimiter substring to Find (;)
- Type \n to Replace
- Set Prompt Each Replace and Regular Expressions options
- Press OK and then click on Yes multiple times (not YesToAll)

What happens:
First delimiter is properly found, then few button clicks makes nothing and then another delimiter is found. This repeats. (In specified example you must click Yes button 10 times)

What should happen:
Yes button should replace delimiter (it does) and then move to next find (it does not). (In my example Yes button should be clicked 5 times)

Options: Reply | Quote | Up ^


#2 Re: Find&Replace, replacing newline.

Posted by: Andreas | Date: 2014-09-01 02:31 | IP: IP Logged

Yes that is weird. You have to set your cursor at end of file and then replace backwards (set direction to backwards).

PSPad is handling newlines badly on replacing and even is not able to search for newlines.

Options: Reply | Quote | Up ^


#3 Re: Find&Replace, replacing newline.

Posted by: pspad | Date: 2014-09-01 04:38 | IP: IP Logged

Some fixes was made in 4.5.8 builds

Options: Reply | Quote | Up ^


#4 Re: Find&Replace, replacing newline.

Posted by: Andreas | Date: 2014-09-01 15:04 | IP: IP Logged

I'm on 4.5.8 2485 but nothing has changed. Am I missing something?

How to search for newline char and replace them with new text?

How to replace found text with newline char forward?

Options: Reply | Quote | Up ^






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