line split(['aaa''bbb''ccc're split(+'line['aaa''bbb''ccc're findall('[]+'line['aaa''bbb''ccc'line 'aaa bbb-ccc ddd -/ & *ere findall('[\-/]+'line['aaa''bbb''ccc''ddd'' & * 'split data with fixed delimiters split on general delimiters find non-delimiter runs handle generalized text at this pointif you've never used pattern syntax in the past your head may very well be spinning (or have blown off entirely!before we go into any further exampleslet' dig into few of the details underlying the re module and its patterns using the re module the python re module comes with functions that can search for patterns right away or make compiled pattern objects for running matches later pattern objects (and module search callsin turn generate match objectswhich contain information about successful matches and matched substrings for referencethe next few sections describe the module' interfaces and some of the operators you can use to code patterns module functions the top level of the module provides functions for matchingsubstitutionprecompilingand so oncompile(pattern [flags]compile regular expression pattern string into regular expression pattern objectfor later matching see the reference manual or python pocket reference for the flags argument' meaning match(patternstring [flags]if zero or more characters at the start of string match the pattern stringreturn corresponding match objector none if no match is found roughly like search for pattern that begins with the operator search(patternstring [flags]scan through string for location matching patternand return corresponding match objector none if no match is found findall(patternstring [flags]return list of strings giving all nonoverlapping matches of pattern in string if there are any groups in patternsreturns list of groupsand list of tuples if the pattern has more than one group finditer(patternstring [flags]return iterator over all nonoverlapping matches of pattern in string regular expression pattern matching