Deprecation warning with python 3.6

Due to this change in python, the regular expression raise a deprecation warning, and will not work in python 3.7

https://bugs.python.org/issue22493

    ATTR = """(?ix)  # Case-insensitive mode, verbose mode
        # Always start with start or semicolon and any number of spaces
        (?:^|;)[ ]*(?:
            # Big disjunction of attribute patterns (*_AV), with named capture
            # groups to extract everything in one pass. Anything unrecognized
            # goes in the 'unrecognized' capture group for reporting.
            {expires}
            |{max_age}
            |{domain}
            |{path}
            |(?P<secure>Secure=?)
            |(?P<httponly>HttpOnly=?)
            |Version=(?P<version>[{stuff}]+)
            |Comment=(?P<comment>[{stuff}]+)
            |(?P<unrecognized>[{stuff}]+)
        )
        # End with any number of spaces not matched by the preceding (up to the
        # next semicolon) - but do not capture these.
        [ ]*
    """.format(expires=EXPIRES_AV, max_age=MAX_AGE_AV, domain=DOMAIN_AV,
               path=PATH_AV, stuff=EXTENSION_AV)

That regex is beyond my own regex fu, so I am effraid I would not be able to submit something better.