Skip to content

Commit 095f611

Browse files
author
hungtu
committed
aichaos#102 Fix re.match to re.search
1 parent 303d607 commit 095f611

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rivescript/brain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ def _getreply(self, user, msg, context='normal', step=0, ignore_object_errors=Tr
376376
bucket = []
377377
for text in matched["reply"]:
378378
weight = 1
379-
match = re.match(RE.weight, text)
379+
match = re.search(RE.weight, text)
380380
if match:
381381
weight = int(match.group(1))
382382
if weight <= 0:

0 commit comments

Comments
 (0)