Re: [fpc-pascal] Last fix for RegExpr (error on empty input)

2020-02-16 Thread DougC
Yes to this idea! On Sat, 15 Feb 2020 10:31:45 -0500 Michael Van Canneyt wrote Since there are already 9 boolean properties, it may be better to introduce a Options set property and mark the others deprecated.___ fpc-pascal maillist -

Re: [fpc-pascal] Last fix for RegExpr (error on empty input)

2020-02-15 Thread Michael Van Canneyt
On Sat, 15 Feb 2020, AlexeyT via fpc-pascal wrote: My app does mass replace with regex. in big text, user enters regex "\b" and replaces it to eg "__". app calls Substitute() with each found match, match is zero length so your code will NOT replace it to "__". but it's needed to replace it t

Re: [fpc-pascal] Last fix for RegExpr (error on empty input)

2020-02-15 Thread AlexeyT via fpc-pascal
My app does mass replace with regex. in big text, user enters regex "\b" and replaces it to eg "__". app calls Substitute() with each found match, match is zero length so your code will NOT replace it to "__". but it's needed to replace it to "__". -- Regards, Alexey _

Re: [fpc-pascal] Last fix for RegExpr (error on empty input)

2020-02-15 Thread Michael Van Canneyt
On Sat, 15 Feb 2020, AlexeyT via fpc-pascal wrote: 1) typo in new Id: iMput. Indeed, I looked right over that. I fixed that. 2) wrong fix for 2nd "Error" call in Substitute(): you disabled Error call but didn't disable Exit, you need to skip Exit there too, so Substitute will return non

[fpc-pascal] Last fix for RegExpr (error on empty input)

2020-02-15 Thread AlexeyT via fpc-pascal
1) typo in new Id: iMput. 2) wrong fix for 2nd "Error" call in Substitute(): you disabled Error call but didn't disable Exit, you need to skip Exit there too, so Substitute will return non empty result when user replaces regex "\b" to e.g. "__". -- Regards, Alexey __