mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-25 05:00:22 +00:00
Breaking: Change regex/iregex to use re.search instead of re.match (#1358)
* Change regex/iregex to use re.search instead of re.match This is BREAKING CHANGE * Also cast to bool. Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> --------- Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
This commit is contained in:
parent
26447d1931
commit
7c99d4af05
1 changed files with 2 additions and 2 deletions
|
@ -26,8 +26,8 @@ OPERATORS = {
|
|||
'endswith': lambda v, q: v.endswith(q),
|
||||
'iendswith': lambda v, q: v.lower().endswith(q),
|
||||
'exists': lambda v, q: v is not None if q else v is None,
|
||||
'regex': lambda v, q: re.match(q, v),
|
||||
'iregex': lambda v, q: re.match(q, v, flags=re.IGNORECASE),
|
||||
'regex': lambda v, q: bool(re.search(q, v)),
|
||||
'iregex': lambda v, q: bool(re.search(q, v, flags=re.IGNORECASE)),
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue