make regex_search_string match expected behaviour

netiawifi
selfisekai 2020-09-09 18:35:09 +02:00
parent d655f3e5de
commit 221b0c30fd
1 changed files with 2 additions and 2 deletions

View File

@ -13,9 +13,9 @@ def regex_search_string(regexes, string, default=None):
if not isinstance(regexes, list):
regexes = [regexes]
for regex in regexes:
match = re.match(regex, string)
match = re.search(regex, string)
if match:
return match
return match.group(1)
return default