abcd wrote:
> I have a regex: '[A-Za-z]:\\([^/:\*\?"<>\|])*'
>
> when I do, re.compile('[A-Za-z]:\\([^/:\*\?"<>\|])*') ...I get
>
> sre_constants.error: unbalanced parenthesis
>
> do i need to escape something else?  i see that i have matching
> parenthesis.

You should use raw string:

re.compile(r'[A-Za-z]:\\([^/:\*\?"<>\|])*')

Regards,
Rob

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to