def _enumeration_info(self, pattern):
        """
        returns (pattern, limits) taking a regular pattern and finding out
        which parts of it correspond to start/stop offsets.  limits is
        a tuple of (start, stop) or None
        """

        if not "[" in pattern or pattern.startswith('~'):
            return (pattern, None)
        (first, rest) = pattern.split("[")
        rest = rest.replace("]","")
        if "-" in rest:
            (left, right) = rest.split("-",1)
            return (first, (left, right))
        else:
            return (first, (rest, rest))
def _enumeration_info ( self , pattern ) : if not "[" in pattern or pattern . startswith ( '~' ) : return ( pattern , None ) ( first , rest ) = pattern . split ( "[" ) rest = rest . replace ( "]" , "" ) if "-" in rest : ( left , right ) = rest . split ( "-" , 1 ) return ( first , ( left , right ) ) else : return ( first , ( rest , rest ) )
returns (pattern, limits) taking a regular pattern and finding out
        which parts of it correspond to start/stop offsets.  limits is
        a tuple of (start, stop) or None