[Gambas-user] RegExp.Replace() question
gambas at ...1...
Sat Apr 29 16:04:07 CEST 2017
Le 29/04/2017 à 13:48, Tobias Boege a écrit :
> Yes, admittedly it is strange behaviour of RegExp.Replace() to invert
> the greediness of all quantifiers and it was discovered just a few days
> ago. I don't know if it is going to be fixed though. I bet there was a
> rationale behind this setting, but we'll have to wait for a comment of
> Benoit who wrote the code.
I have no idea about why I forced the PCRE_UNGREEDY flag. :-/
Maybe to match the behaviour of the Gambas Replace() function.
The only thing I can do is the following: when specifying explicitly the
RegExp.Ungreedy constant in the RegExp.Replace() options, then do the
contrary (remove the ungreedy flag).
What do you think about that?
More information about the User