You are here: PSPad forum > English discussion forum > Find/Replace Regular Expression limit

Find/Replace Regular Expression limit

Goto Page: Previous1 2

#11 Re: Find/Replace Regular Expression limit

Posted by: pspad | Date: 2021-01-08 17:24 | IP: IP Logged

Please don't mix REG_REPLACE() from e.g. SnowFlake. PSPad doesn't use such function and such syntax. It doesn't mean when one programming language contains such function, that it's general function over the whole world.

Options: Reply | Quote | Up ^


#12 Re: Find/Replace Regular Expression limit

Posted by: tmpad | Date: 2021-01-13 09:50 | IP: IP Logged

The error is in the RE (.*)(b|c)(.*), not in PSPad.
The first term (.*) matches the longest part of "a b b c c b b d" until one b or c is left. So the result "a b b c c b ~ d" is correct.

A solution to your problem is:
Find: [bc]
Replace: ~

The same logic applies to the SQL problem. Don't make things more complicated then they are...

Options: Reply | Quote | Up ^


Goto Page: Previous1 2





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