Parens don't need escaping in regexp char classes

This commit is contained in:
Daniele Varrazzo 2012-02-23 14:31:16 +00:00
parent 1332d4a0d8
commit f782470d71

View File

@ -849,9 +849,9 @@ class CompositeCaster(object):
return self._ctor(*attrs)
_re_tokenize = regex.compile(r"""
\(? ([,\)]) # an empty token, representing NULL
\(? ([,)]) # an empty token, representing NULL
| \(? " ((?: [^"] | "")*) " [,)] # or a quoted string
| \(? ([^",\)]+) [,\)] # or an unquoted string
| \(? ([^",)]+) [,)] # or an unquoted string
""", regex.VERBOSE)
_re_undouble = regex.compile(r'(["\\])\1')