<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def regexp_error_msg(pattern):

 """
 Return None if the pattern is a valid regular expression or
 a string describing why the pattern is invalid.
 """

    try:
        re.compile(pattern)
    except re.error as e:
        return str(e)
    return None