Skip to content

Commit

Permalink
backport regex patch
Browse files Browse the repository at this point in the history
  • Loading branch information
fit-alessandro-berti committed Dec 1, 2024
1 parent 102c5fa commit 1a58385
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pm4py/algo/filtering/common/traces/infix_to_regex.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from re import escape

def translate_infix_to_regex(infix):
regex = "^"
for i, act in enumerate(infix):
Expand All @@ -8,6 +10,9 @@ def translate_infix_to_regex(infix):
else:
regex = f"{regex}([^,]*,)*"
else:
if act:
act = escape(act)

if is_last_activity:
regex = f"{regex}{act}"
else:
Expand Down

0 comments on commit 1a58385

Please sign in to comment.