Skip to content

[3.12] gh-101699: Explain using Match.expand with \g<0> (GH-101701) - #115583

Merged
serhiy-storchaka merged 1 commit into
python:3.12from
miss-islington:backport-d2d7808-3.12
Feb 17, 2024
Merged

serhiy-storchaka merged 1 commit into
python:3.12from
miss-islington:backport-d2d7808-3.12

Conversation

@miss-islington

@miss-islington miss-islington commented Feb 17, 2024 •

Copy link
Copy Markdown
Contributor

Update documentation for re library to explain that a backreference \g<0> is
expanded to the entire string when using Match.expand().
Note that numeric backreferences to group 0 (\0) are not supported.

(cherry picked from commit d2d7808)

Co-authored-by: Stevoisiak S.Vascellaro@gmail.com
Co-authored-by: Serhiy Storchaka storchaka@gmail.com


📚 Documentation preview 📚: https://cpython-previews--115583.org.readthedocs.build/

Update documentation for re library to explain that a backreference `\g<0>` is
expanded to the entire string when using Match.expand().
Note that numeric backreferences to group 0 (`\0`) are not supported.

(cherry picked from commit d2d7808)

Co-authored-by: Stevoisiak <S.Vascellaro@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app bedevere-app Bot added the docs Documentation in the Doc dir label Feb 17, 2024
@serhiy-storchaka
serhiy-storchaka merged commit a086dd3 into python:3.12 Feb 17, 2024
@miss-islington
miss-islington deleted the backport-d2d7808-3.12 branch January 2, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants