Skip to content

Commit 3a938d2

Browse files
authored
fix: use re.search instead of re.match in RegexFilter (#5368)
1 parent 812834b commit 3a938d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

astrbot/core/star/filter/regex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ def __init__(self, regex: str) -> None:
1515
self.regex = re.compile(regex)
1616

1717
def filter(self, event: AstrMessageEvent, cfg: AstrBotConfig) -> bool:
18-
return bool(self.regex.match(event.get_message_str().strip()))
18+
return bool(self.regex.search(event.get_message_str().strip()))

0 commit comments

Comments
 (0)