]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-101699: Explain using Match.expand with \g<0> (GH-101701) (GH-115583)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 17 Feb 2024 13:04:09 +0000 (14:04 +0100)
committerGitHub <noreply@github.com>
Sat, 17 Feb 2024 13:04:09 +0000 (15:04 +0200)
commita086dd313e4c79d8bdcaf7c49fd48306e769fce0
treeddcfd7f8cbc4a958438932bde80c8d89c24eea08
parent3991db062e8df2ebcf22d25e37157da7678889a1
[3.12] gh-101699: Explain using Match.expand with \g<0> (GH-101701) (GH-115583)

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 d2d78088530433f475d9304104bbc0dac2536edd)

Co-authored-by: Stevoisiak <S.Vascellaro@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/library/re.rst