def regexp_tokenize(text, pattern, gaps=False, discard_empty=True, flags=((re.UNICODE | re.MULTILINE) | re.DOTALL)):
 tokenizer = RegexpTokenizer(pattern, gaps, discard_empty, flags)
 return tokenizer.tokenize(text)

def regexp_tokenize ( text , pattern , gaps = False , discard_empty = True , flags = ( ( re . UNICODE | re . MULTILINE ) | re . DOTALL ) ) : tokenizer = RegexpTokenizer ( pattern , gaps , discard_empty , flags ) return tokenizer . tokenize ( text )
return a tokenized copy of *text* .