re.DOTALL flag in python regular expressions

In Python regular expressions the . character matches any character except newlines. If the re.DOTALL flag is used newlines are matched.

In [10]: re.match('.*', 'foo bar jazz    \n\n').group(0)
Out[10]: 'foo bar jazz    '

In [11]: re.match('.*', 'foo bar jazz    \n\n', re.DOTALL).group(0)
Out[11]: 'foo bar jazz    \n\n'

Source