From 960ad61064813bf31fe31adede5d4326aef8787c Mon Sep 17 00:00:00 2001 From: igeni Date: Fri, 22 Mar 2024 16:00:26 +0300 Subject: [PATCH] fixed regexp to add support of unicode for strings --- metagpt/actions/rebuild_sequence_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/actions/rebuild_sequence_view.py b/metagpt/actions/rebuild_sequence_view.py index 0e67de908..2aac9bf20 100644 --- a/metagpt/actions/rebuild_sequence_view.py +++ b/metagpt/actions/rebuild_sequence_view.py @@ -486,7 +486,7 @@ class RebuildSequenceView(Action): Returns: List[str]: A list of participants extracted from the sequence diagram. """ - pattern = r"participant ([a-zA-Z\.0-9_]+)" + pattern = r"participant ([\w\.]+)" matches = re.findall(pattern, mermaid_sequence_diagram) matches = [re.sub(r"[\\/'\"]+", "", i) for i in matches] return matches