We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec32086 commit 8407e57Copy full SHA for 8407e57
src/zkregex_fuzzer/utils.py
@@ -45,15 +45,15 @@ def check_zkregex_rules_basic(regex: str) -> bool:
45
if len(regex) > 0 and regex[0] == "^":
46
allowed_positions.add(0)
47
48
- # If the string contains '(|^)', that means '^' is at position (idx+2)
+ # If the string contains '|^', that means '^' is at position (idx+1)
49
idx = 0
50
while True:
51
- idx = regex.find("(|^)", idx)
+ idx = regex.find("|^", idx)
52
if idx == -1:
53
break
54
- # '^' occurs at (idx + 2)
55
- allowed_positions.add(idx + 2)
56
- idx += 4 # skip past
+ # '^' occurs at (idx + 1)
+ allowed_positions.add(idx + 1)
+ idx += 2 # skip past
57
58
# If the string contains '[^]', that means '^' is at position (idx+1)
59
0 commit comments