code: def _matchPattern(regExp, string):
          
          match = regExp.match(string)
          if match is not None and match.group(0):
              return match.group(0), (match.group(0), ) + match.groups()
          else:
              return None, None
docs: Try to match pattern.
          Returns tuple (whole match, groups) or (None, None)
          Python function, used by C code