match = lambda s: pattern.match(s) is not None
s = 'This is an example string'
print(match(s), ':', repr(s))
s = """This is an 
 example string"""
print(match(s), ':', repr(s))
s = """This is 
 an unmatching string"""
print(match(s), ':', repr(s))
Сопоставление строки, которая произвольно разбита на несколько строк