On Sun, Jan 1, 2017 at 8:25 PM, Terry Reedy <tjre...@udel.edu> wrote: \> 3.6 added syntax for 'local flags'. > ''' > (?imsx-imsx:...) > > (Zero or more letters from the set 'i', 'm', 's', 'x', optionally > followed by '-' followed by one or more letters from the same set.) The > letters set or removes the corresponding flags: re.I (ignore case), re.M > (multi-line), re.S (dot matches all), and re.X (verbose), for the part of > the expression. (The flags are described in Module Contents.) > ''' > Here is the replacement for the above, curtesy of Serhiy Storchaka. > > r"(?i:\br|u|f|fr|rf|b|br|rb)?"
What is the difference between the letters before the hyphen and those after? I guess that placing the letter before means to set the flag and after means to unset it, but it's not clear from the documentation. -- https://mail.python.org/mailman/listinfo/python-list