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:
parent
486b4bb282
commit
bd66615f61
@ -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)
|
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):
|
def validate_court(lawsuit: str):
|
||||||
return court_pat.match(lawsuit)
|
return court_pat.search(lawsuit)
|
||||||
|
|
||||||
def validate_accuser(lawsuit):
|
def validate_accuser(lawsuit):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user