code: def splitext(filepath):
      
      exts = getattr(CRE_FILENAME_EXT.search(filepath), 'group', str)()
      return (filepath[:(-len(exts) or None)], exts)
docs: Like os.path.splitext except splits compound extensions as one long one
  
      >>> splitext('~/.bashrc.asciidoc.ext.ps4.42')
      ('~/.bashrc', '.asciidoc.ext.ps4.42')
      >>> splitext('~/.bash_profile')
      ('~/.bash_profile', '')