Update Field Searches to match multi-line fields

Currently, field searches are confirmed by a regex search with the single option of case-insensitive (?i), and with the beginning and ending markers ^ and $. Since multi-line is not enabled, and re.DOTALL (option s) is not enabled, the field search will fail for any field with a new line
This commit is contained in:
Avi Puchalapalli 2015-09-25 11:13:42 -04:00
parent 97b858edd8
commit 2f74908b25

View file

@ -433,7 +433,7 @@ where mid in %s and flds like ? escape '\\'""" % (
ord = mods[str(mid)][1] ord = mods[str(mid)][1]
strg = flds[ord] strg = flds[ord]
try: try:
if re.search("(?i)^"+regex+"$", strg): if re.search("(?si)^"+regex+"$", strg):
nids.append(id) nids.append(id)
except sre_constants.error: except sre_constants.error:
return return