suggest the following as somewhat more "standard" definition of bit flags

IGNORECASE       = 0x01
EXTENDED         = 0x02
MULTILINE        = 0x04
DOTALL           = 0x08
LOCALE_DEPENDENT = 0x10
UNICODE          = 0x20

Is the ordering arbitrary?  The strings equivalents are specified to be ordered 'ilmsux', so maybe the bit flag order should be

IGNORECASE       = 0x01
LOCALE_DEPENDENT = 0x02
MULTILINE        = 0x04
DOTALL           = 0x08
UNICODE          = 0x10
EXTENDED         = 0x20

It probably doesn't matter as long as they are documented.  Also the inbound parameter example probably should be in hex to signify bit flags.