You are here: PSPad forum > Bug report / Hlášení chyb > Regexp replace bug...

Regexp replace bug...

#1 Regexp replace bug...

Posted by: vvoois | Date: 2013-05-12 19:39 | IP: IP Logged

Copy paste this code into any new text file (it should be one big line of data):

<ParameterChunk><![CDATA[AQAAAEAAAAANAAAAEQAAAEIAYQByAHIAaQBjAGEAZABlACAAbABpAG0AaQB0AGUAcgAAAAA/CtcjPQAAAD+rqqo+AAAAAKNwfT8AAAAAMzOzPgAAgD8AAAAAzcxMPgAAAAAAAIA/]]></ParameterChunk>

Press Ctrl-H
In the Search for, enter "/"
In the replace field enter "\n/"
Check the "regular Expressions"
Click Ok and notice Pspad getting caught in a non-interruptable loop.....
Replacing single characters for newline combinations found on one single line has always been a big problem in Pspad.
I'm currently using 4.5.7. In 4.5.4 it at least stopped after one attempt.
I updated in the hope it got fixed, but in fact the problem turned worse...

Thanks for the other improvements though, keep up the good work!

Options: Reply | Quote | Up ^


#2 Re: Regexp replace bug...

Posted by: vbr | Date: 2013-05-12 21:13 | IP: IP Logged

vvoois:
Copy paste this code into any new text file (it should be one big line of data):

<ParameterChunk><![CDATA[AQAAAEAAAAANAAAAEQAAAEIAYQByAHIAaQBjAGEAZABlACAAbABpAG0AaQB0AGUAcgAAAAA/CtcjPQAAAD+rqqo+AAAAAKNwfT8AAAAAMzOzPgAAgD8AAAAAzcxMPgAAAAAAAIA/]]></ParameterChunk>

Press Ctrl-H
In the Search for, enter "/"
In the replace field enter "\n/"
Check the "regular Expressions"
Click Ok and notice Pspad getting caught in a non-interruptable loop.....
Replacing single characters for newline combinations found on one single line has always been a big problem in Pspad.
I'm currently using 4.5.7. In 4.5.4 it at least stopped after one attempt.
I updated in the hope it got fixed, but in fact the problem turned worse...

Thanks for the other improvements though, keep up the good work!

Hi,
you may try the current developer version (beta)
forum.pspad.com
(just overwrite the previous full version 4.5.7 (possibly in some "testing" folder) with the updated files from the betaversion.

It works for me on PSPad 4.5.8 (2455) - win7

Using the original workaround - backwards replace from the end of the file, it works as expected.
Due to some internal workaround, it also almost works in a normal - forward - direction, howewer, the given info about the number of replacements seems to be incorrect, probably duplicated (6 instead of 3 in this case)

hth,
vbr

Options: Reply | Quote | Up ^


#3 Re: Regexp replace bug...

Posted by: vvoois | Date: 2013-05-18 21:34 | IP: IP Logged

Thanks for the tip.. I could have tried backward replacement myself as well.

I already had downloaded the 4.5.8 build and tried the same after i made this post, the result was the same, though the loop went silent (no more visual updates unless you focussed a different process and then went back to PSpad)

You might perhaps perform this procedure hidden in the background if one liners are being processed (or last liners as i suspect if it would have been the last line without hard return, it would cause the same problem).

Options: Reply | Quote | Up ^






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