Another patch related to the #1655

This commit is contained in:
Miroslav Stampar 2016-01-10 23:07:11 +01:00
parent 8b01996adf
commit e519ed2e18

View File

@ -94,7 +94,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
if retVal is None or partialValue: if retVal is None or partialValue:
try: try:
while True: while True:
check = "%s(?P<result>.*?)%s" % (kb.chars.start, kb.chars.stop) check = r"%s(?P<result>.*?)%s" % (kb.chars.start, kb.chars.stop)
trimcheck = r"%s(?P<result>[^<\n]*)" % (kb.chars.start) trimcheck = r"%s(?P<result>[^<\n]*)" % (kb.chars.start)
if field: if field:
@ -153,7 +153,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
logger.warn(warnMsg) logger.warn(warnMsg)
if not kb.testMode: if not kb.testMode:
check = "(?P<result>.*?)%s" % kb.chars.stop[:2] check = r"(?P<result>[^<>\n]*?)%s" % kb.chars.stop[:2]
output = extractRegexResult(check, trimmed, re.IGNORECASE) output = extractRegexResult(check, trimmed, re.IGNORECASE)
if not output: if not output: