diff options
Diffstat (limited to 'Lib/sre.py')
-rw-r--r-- | Lib/sre.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/sre.py b/Lib/sre.py index b1ed9fbcfa..6dea5c4045 100644 --- a/Lib/sre.py +++ b/Lib/sre.py @@ -105,6 +105,11 @@ def _compile(*key): _cache[key] = p return p +def _expand(pattern, match, template): + # internal: match.expand implementation hook + template = sre_parse.parse_template(template, pattern) + return sre_parse.expand_template(template, match) + def _sub(pattern, template, string, count=0): # internal: pattern.sub implementation hook return _subn(pattern, template, string, count)[0] |