Steven D'Aprano wrote:
Assuming that you want to find runs of \uXXXX escapes, simply use non-capturing parentheses:pat = re.compile(u"(?:\\\u[0-9A-F]{4})")Doesn't work for me:pat = re.compile(u"(?:\\\u[0-9A-F]{4})")
it helps if you cut and paste the right line... here's a better version: pat = re.compile(r"(?:\\u[0-9A-F]{4})+") </F> -- http://mail.python.org/mailman/listinfo/python-list