Repository navigation
gh-101699: Explain using Match.expand with \g<0> - #101701
Merged
Merged
Conversation
Update documentation for `re` library to explain that a backreference to group0 (`\g<0>`) is expanded to the entire string when using `Match.expand()`. Note that numeric backreferences to group 0 (`\0`) are not supported. (See https://stackoverflow.com/q/58134893/3357935)
Stevoisiak
requested review from
a team,
AlexWaygood,
Fidget-Spinner,
JelleZijlstra,
abalkin,
berkerpeksag,
brettcannon,
cjw296,
encukou,
ericsnowcurrently,
ericvsmith,
erlend-aasland,
ethanfurman,
gpshead,
gvanrossum,
isidentical,
lysnikolaou,
ncoghlan,
pablogsal,
pganssle,
rhettinger and
terryjreedy
as code owners
February 8, 2023 18:31
AlexWaygood
removed request for
1st1,
Fidget-Spinner,
JelleZijlstra,
abalkin,
asvetlov,
cjw296,
encukou,
ericsnowcurrently,
ericvsmith,
erlend-aasland,
ethanfurman,
ezio-melotti,
gvanrossum,
iritkatriel,
lysnikolaou,
markshannon,
ncoghlan,
pablogsal,
pganssle,
rhettinger,
terryjreedy and
tiran
February 8, 2023 18:32
Contributor
Author
|
My apologies for the multiple pull requests and review tags from changing the branch. It was unintentional. |
serhiy-storchaka
approved these changes
Feb 17, 2024
|
Thanks @Stevoisiak for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
|
GH-115583 is a backport of this pull request to the 3.12 branch. |
|
GH-115584 is a backport of this pull request to the 3.11 branch. |
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.
Update documentation for
relibrary to explain that a backreference to group0 (\g<0>) is expanded to the entire string when usingMatch.expand(). Note that numeric backreferences to group 0 (\0) are not supported. (See https://stackoverflow.com/q/58134893/3357935)