Skip to content

Conversation

@ieviev
Copy link

@ieviev ieviev commented May 13, 2024

I'm very surprised no one else has noticed this in a decade but certain parts of the pattern are fundamentally broken, so i reordered the patterns by descending length.

The problem is that | in PCRE compatible (e.g. nearly all popular engines including python) engines does not really mean or but rather try the next if it fails.

image

This behavior applies to days, months, timezones and extra tokens in the pattern, Reordering the alternations fixes the behavior.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant