We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c88d0c5 commit af258ffCopy full SHA for af258ff
django_jinja_knockout/utils/regex.py
@@ -1,3 +1,8 @@
1
+# https://regexr.com
2
+class MatchGroup(str):
3
+ pass
4
+
5
6
# regex can be without capturing group.
7
def finditer_with_separators(regex, s):
8
matches = []
@@ -6,7 +11,7 @@ def finditer_with_separators(regex, s):
11
match_start = match.start()
12
if (prev_end != 0 or match_start > 0) and match_start != prev_end:
13
matches.append(s[prev_end:match.start()])
9
- matches.append(match.group())
14
+ matches.append(MatchGroup(match.group()))
10
15
prev_end = match.end()
16
if prev_end < len(s):
17
matches.append(s[prev_end:])
0 commit comments