![]() |
|
|
+ Search |
![]()
|
Mar 1st, 2000 19:39
Nathan Wallace, unknown unknown, Fredrik Lundh
Why not just compile a bad expression and see what happens? ;-)
>>> re.compile("(")
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "C:\py152\lib\re.py", line 79, in compile
code=pcre_compile(pattern, flags, groupindex)
pcre.error: ('missing )', 1)
(to catch the exception, use try/except re.error)