In the middle of the desert you can say anything you want

06 Dec 2021

211206-0353 Python multiline regexes

In python, when doing regex on a multiline string:

  • re.MULTILINE makes ^ and $ match on each line, not just begin/end of entire string.
  • re.DOTALL makes . match newline (by default it doesn’t).
Nel mezzo del deserto posso dire tutto quello che voglio.