From bd66615f613a36d2c7d54d4380d19d0a485c3ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20K=C3=A1n=C4=9B?= Date: Sat, 23 Jan 2021 04:19:36 +0100 Subject: [PATCH] use re.search instead of re.match, so that maches do not have to be at the beginning of the string --- validator/validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validator/validator.py b/validator/validator.py index 4a4f95f..a11a8b0 100644 --- a/validator/validator.py +++ b/validator/validator.py @@ -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