summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/re.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/re.py b/Lib/re.py
index dce29ceac9..d190363df4 100644
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -167,6 +167,7 @@ class RegexObject:
regs = match(source, pos, end, 0)
if not regs:
break
+ self._num_regs = len(regs)
i, j = regs[0]
if i == j == lastmatch:
# Empty match adjacent to previous match