Hi; Forgive multiple posts in one day: online very infrequently I'm having the darndest time trying to figure out how the character '\b0' is being read in "('\x0c')" >>> test = re.search('(?<=\\b)[0]', '\x0c0') >>> test.group(0) '0' >>> type('\x0c') <type 'str'> >>> import binascii >>> binascii.unhexlify('\x0c') Traceback (most recent call last): File "<pyshell#643>", line 1, in <module> binascii.unhexlify('\x0c') TypeError: Odd-length string
What gives here? Here's another one: >>> rtf_markup = '\viewkind4\\uc1\\pard\nowidctlpar\\qc\\i\x0c0\x0cs36' >>> a = [] >>> a.append(re.compile('\\i').match(rtf_markup, 1)) >>> a [<_sre.SRE_Match object at 0x011802F8>] >>> a = [] >>> a.append(re.compile('\\qc').match(rtf_markup, 1)) [None] What's the problem? TIA, Victor
-- http://mail.python.org/mailman/listinfo/python-list