Repository navigation
(outdated) gh-101699: Explain using Match.expand with \g<0> - #101475
Closed
Stevoisiak wants to merge 2 commits into
Closed
Stevoisiak wants to merge 2 commits into
Stevoisiak wants to merge 2 commits into
Conversation
Explain that a named 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/questions/58134893/why-doesnt-0-work-in-python-regexp-substitutions-i-e-with-sub-or-expand)
Member
|
It seems you accidentally removed your branch by mistake thus autoclosing the PR. |
Contributor
Author
I renamed the branch to give it a more descriptive name. Apparently this closed the pull request instead of updating the branch. |
Contributor
Author
|
@arhadthedev Since renaming the branch for the existing PR isn't working, should I make a new pull request with the updated branch name? |
Member
Absolutely no problem. By the way, GitHub is limited in branch recovery (we already call to recrete PRs that target a wrong branch, for example). |
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)An issue number was not included since this diff only changes documentation without modifying code.