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 to "__".
That can well be, but maybe in that case you need to change your app for this particular use case. It's very much a corner case. The alternative is to introduce a new boolean option for TRegexp which controls the behaviour of substitute. Since there are already 9 boolean properties, it may be better to introduce a Options set property and mark the others deprecated. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal