Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed unreachable branches #200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed unreachable branches #200

wants to merge 1 commit into from

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