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

Python: Improve Regex flag parsing #15345

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

Conversation

Marcono1234
Copy link
Contributor

Similar to #15244, except for the Python Regex module

Fixes:

  • Flag a not being recognized
  • Syntax for disabling flags (-) not being recognized
  • Non-capturing group with flags erroneously containing : as literal

Any feedback is appreciated! Especially if I overlooked or failed to consider something, because I am not very familiar with the Python Regex library.

Without these changes parsing of inline flags fails for a and - and erroneously treats the remaining characters incorrectly, e.g. matching them literally. See the added code examples in regex/test.py for which parsing fails without these changes.

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

Successfully merging this pull request may close these issues.

None yet

1 participant