use re.search instead of re.match, so that maches do not have to be at the beginning of the string

This commit is contained in:
Vojtěch Káně 2021-01-23 04:19:36 +01:00
parent 486b4bb282
commit bd66615f61

View File

@ -32,7 +32,7 @@ def process_file(f):
court_pat = re.compile(r"(okresní|krajský|vrchní|nejvyšší(\s+správní\S*)|ústavní)\S*\s+soud\S*(\s+ve?)?\s+(\S+)", flags=re.IGNORECASE)
def validate_court(lawsuit: str):
return court_pat.match(lawsuit)
return court_pat.search(lawsuit)
def validate_accuser(lawsuit):
pass