diff --git a/rivescript/brain.py b/rivescript/brain.py index 4426ff6..92ff619 100644 --- a/rivescript/brain.py +++ b/rivescript/brain.py @@ -376,7 +376,7 @@ def _getreply(self, user, msg, context='normal', step=0, ignore_object_errors=Tr bucket = [] for text in matched["reply"]: weight = 1 - match = re.match(RE.weight, text) + match = re.search(RE.weight, text) if match: weight = int(match.group(1)) if weight <= 0: