From f782470d7109c62101e40422923bc9dfec28cfc9 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Thu, 23 Feb 2012 14:31:16 +0000 Subject: [PATCH] Parens don't need escaping in regexp char classes --- lib/extras.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/extras.py b/lib/extras.py index ae77a882..3237cabb 100644 --- a/lib/extras.py +++ b/lib/extras.py @@ -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')