def split(self, instring, maxsplit=_MAX_INT, includeSeparators=False):
splits = <NUM_LIT:0><EOL>last = <NUM_LIT:0><EOL>for t,s,e in self.scanString(instring, maxMatches=maxsplit):<EOL><INDENT>yield instring[last:s]<EOL>if includeSeparators:<EOL><INDENT>yield t[<NUM_LIT:0>]<EOL><DEDENT>last = e<EOL><DEDENT>yield instring[last:]<EOL>
Generator method to split a string using the given expression as a separator.
May be called with optional ``maxsplit`` argument, to limit the number of splits;
and the optional ``includeSeparators`` argument (default= ``False``), if the separating
matching text should be included in the split results.

Example::

    punc = oneOf(list(".,;:/-!?"))
    print(list(punc.split("This, this?, this sentence, is badly punctuated!")))

prints::

    ['This', ' this', '', ' this sentence', ' is badly punctuated', '']