<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def PatternMatch(regex):
 """Compute the score of a text by determing if a pattern matches. Example: 0 -1 Args: regex (str):
 regular expression string to use as a pattern """

    pattern = re.compile(regex)
    return lambda text: -1 if pattern.search(text) is None else 0