parameters: (regex)
return_statement: return re.sub('([^\\\\])[()]', '\\1', regex) \
          .replace('[ \t]*$', '') \
          .replace('^', '') \
          .replace('$', '') \
          .replace('[ \t]*', ' ') \
          .replace('[ \t]+', ' ') \
          .replace('[0-9]+', 'X') \
          \
          .replace('\\[', '[') \
          .replace('\\]', ']') \
          .replace('\\(', '(') \
          .replace('\\)', ')') \
          .replace('\\.', '.')
docstring: Format a human-readable error message from a regex
docstring_summary: Format a human-readable error message from a regex
docstring_tokens: Format a human - readable error message from a regex
function: def regex_to_error_msg(regex):
      """Format a human-readable error message from a regex"""
      return re.sub('([^\\\\])[()]', '\\1', regex) \
          .replace('[ \t]*$', '') \
          .replace('^', '') \
          .replace('$', '') \
          .replace('[ \t]*', ' ') \
          .replace('[ \t]+', ' ') \
          .replace('[0-9]+', 'X') \
          \
          .replace('\\[', '[') \
          .replace('\\]', ']') \
          .replace('\\(', '(') \
          .replace('\\)', ')') \
          .replace('\\.', '.')
function_tokens: def regex_to_error_msg ( regex ) : return re . sub ( '([^\\\\])[()]' , '\\1' , regex ) . replace ( '[ \t]*$' , '' ) . replace ( '^' , '' ) . replace ( '$' , '' ) . replace ( '[ \t]*' , ' ' ) . replace ( '[ \t]+' , ' ' ) . replace ( '[0-9]+' , 'X' ) . replace ( '\\[' , '[' ) . replace ( '\\]' , ']' ) . replace ( '\\(' , '(' ) . replace ( '\\)' , ')' ) . replace ( '\\.' , '.' )