Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

fixed regexp to add support of unicode for strings

igeni960ad6106481
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