matchstarts pattern matching at beginning of the string returns re matchobject or none text adm : : st graf :home adm :bin bash grp re match ( - ]+) :[ - ]+:[ - ]+:+)+text compileregular expressions can be pre-compiled gain performance on reusing these regexp multiple times ( in loopspattern re compile \*?\pattern findall bc hal def 'bc 'hal 'member of the helmholtz association slide