code: def PatternMatch(regex):
      
      pattern = re.compile(regex)
      return lambda text: -1 if pattern.search(text) is None else 0
docs: Compute the score of a text by determing if a pattern matches.
  
      Example:
          >>> fitness = PatternMatch("flag{.*}")
          >>> fitness("flag{example}")
          0
  
          >>> fitness("junk")
          -1
  
      Args:
          regex (str): regular expression string to use as a pattern