{{ message }}
gh-91760: More strict rules for numerical group references and group names in RE#91792
Merged
Merged
Conversation
…group names in RE Only sequence of ASCII digits not starting with 0 (except group 0) is now accepted as a numerical reference. The group name in bytes patterns and replacement strings can now only contain ASCII letters and digits and underscore.
3f533f8 to
8909d14
Compare
ezio-melotti
requested changes
Apr 24, 2022
ezio-melotti
left a comment
Member
There was a problem hiding this comment.
I'm also not sure about forbidding the leading 0, since it feels like a special case that only makes things more complicated and inconsistent with other implementations.
serhiy-storchaka
left a comment
Member
Author
There was a problem hiding this comment.
This PR adds restrictions without deprecation. See also #91794.
Member
Author
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @ezio-melotti: please review the changes made to this pull request. |
ezio-melotti
approved these changes
Apr 24, 2022
ezio-melotti
left a comment
Member
There was a problem hiding this comment.
LGTM. Are you still planning to add a deprecation warning?
Member
Author
|
See #91794. |
|
What's that DO-NOT-MERGE label for |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Only sequence of ASCII digits
not starting with 0 (except group 0)isnow accepted as a numerical reference.
The group name in bytes patterns and replacement strings can now only
contain ASCII letters and digits and underscore.
Closes #91760.