-
-
Notifications
You must be signed in to change notification settings - Fork 199
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 supports setting flags in the regex #1271
Comments
Inline flags and global flags are two different things... I don't think your expectation of having the global flags be in sync with the inline flags is correct. |
True, but I don't expect that a user will ever have a different set of flags set. Assuming I am making sense, then this would only help a user in copy-pasting between his code and his playground. The only issue I see is if the user explicitly wants to set global flags, and, at the same time, explicitly does not want to set inline flags. However, this could be easily solvable ( |
If its included, the regex will be invalid when used in code. I try to refrain from that as much as possible. |
Bug Description
If flags are given at the beginning of the regex, REPL flags should follow the flags set on the regex string itself.
Reproduction steps
(?mu)^\h*\+(.+)\+\h*$
Expected Outcome
mu
flags are set, without removing them from the regex stringBrowser
GChrome 79+
OS
Ubuntu 16.04.X
The text was updated successfully, but these errors were encountered: