Skip to main content

Compilation, Flags, and Performance

Regex Flags In-Depth

0:00
LearnStep 1/3

Common Regex Flags

Common Regex Flags

re.IGNORECASE (re.I)

Makes matching case-insensitive.

re.MULTILINE (re.M)

Makes ^ and $ match start/end of each line.

re.DOTALL (re.S)

Makes . match newlines too.

python