Open omerlaufer opened 8 years ago
Duplicate of #40.
I am curious if anyone knows a solution. RE2 doesn't provide the equivalent operator (\Z
), cf. https://github.com/google/re2/wiki/Syntax
It's not enough to do \n?$
because that behaves differently in substitutions, and in this case, by including the newline in the match.
Incidentally, why do you care? I found this behavior of $
rather odd, can't see why it's desirable.
The stated goal of this module is to be a drop-in replacement for re. to be compatible with re.
I understand if there are features that not supported, either because its fundamentally can't be done by re2 engine or just because its didn't implemented yet. But if pyre2 behaves differently for the same regex, its not aligned with pyre2 goal.
documentation of gnu regex and also re module says:
look at this simple example:
Is this behaviour is intentionally?