Replace usage of "match" as a variable name

This commit is contained in:
Veronica Berglyd Olsen
2024-10-14 00:14:08 +02:00
parent 57e739c3ef
commit 2447ae5cff
4 changed files with 26 additions and 26 deletions
+3 -3
View File
@@ -32,10 +32,10 @@ from novelwriter.text.patterns import REGEX_PATTERNS
def allMatches(regEx: re.Pattern, text: str) -> list[list[str]]:
"""Get all matches for a regex."""
result = []
for match in regEx.finditer(text):
for res in regEx.finditer(text):
result.append([
(match.group(n), match.start(n), match.end(n))
for n in range((match.lastindex or 0) + 1)
(res.group(n), res.start(n), res.end(n))
for n in range((res.lastindex or 0) + 1)
])
return result