c = re.compile(
    """(\\w+).s(\\d+)
                       (?:
                            e(\\d+)
                            (?:
                                  e(\\d+)
                            )?
                        )?
               """
    , re.X)
Regex and a sequences of patterns?