Lines from template log are first matched literally and then as regex. In failure cases a line that is expected to match literally will not match and be tried as a regex patter. If the line has unqualified regex it may raise exception. Hence regex exception should be handled as a possibility and match() function should return False (no match) on exception.
@mazimkhan merge commits onto PRs are frowned upon (certainly for mbed-os) code as it makes patching hard. A rebase and force push would have been better....
Lines from template log are first matched literally and then as regex. In failure cases a line that is expected to match literally will not match and be tried as a regex patter. If the line has unqualified regex it may raise exception. Hence regex exception should be handled as a possibility and match() function should return False (no match) on exception.
@bridadan @adbridge Please review.