slugs = re.compile(
    """
    ^
    top-dir/
    (?P<first_slug>[-\\w]+?)/
    (?P<second_slug>[-\\w]+?)/
    (?P<third_slug>[-\\w]+?).html/
    $
        """
    , re.VERBOSE | re.IGNORECASE)
How to specify long url patterns using Regex so that they follow PEP8 guidelines