Skip to content

Commit

Permalink
fix: regex edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
bliutech committed Jul 19, 2024
1 parent b77f92f commit b88d1ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solver/passes/z3_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run_pass(ast: Expr) -> Expr:
# this is a hack to fix that

# Pattern to match "Xor(A, B)"
pattern = r"Xor\(([A-Z \|&\^\(\)]+), ([A-Z \|&\^\(\)]+)\)"
pattern = r"Xor\(([A-Z \|&!\^\(\)]+), ([A-Z \|&!\^\(\)]+)\)"
# Replacement string using backreferences to capture groups
replacement = r"\1 ^ \2"
# Performing the replacement. Loop to catch nested Xor calls
Expand Down

0 comments on commit b88d1ba

Please sign in to comment.