5. Multi line searches

Listing 329. Usage of regexp
import re

PATTERN = r'[A-Z]{2,10}-[0-9]{1,6}'
TEXT = """
MYPROJ-1337 Fixed inspectdb crash;
MYPROJ-997 Remove commented out code
"""

re.findall(PATTERN, TEXT)
# []

re.findall(PATTERN, TEXT, flags=re.MULTILINE)
# ['MYPROJ-1337', 'MYPROJ-997']