Database.select(where=('','LIKE','')) in Python matches across lines

This commit is contained in:
Doug Blank 2016-01-31 21:47:37 -05:00
parent 18ac940566
commit 72e897b44b

View File

@ -1940,7 +1940,8 @@ class DbWriteBase(DbReadBase):
elif op == "LIKE":
if value and v:
value = value.replace("%", "(.*)").replace("_", ".")
matched = re.match("^" + value + "$", v)
## FIXME: allow a case-insensitive version
matched = re.match("^" + value + "$", v, re.MULTILINE)
else:
matched = False
else: