Re: how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread yichao.zhang
MacDonald Thanks! John Now I know how silly a question that is ! However I'll be not so silly thanks to your help ! I'll follow your suggestions! That's very nice. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread John Machin
On 11/07/2006 12:32 PM, yichao.zhang wrote: > I'm trying to match the characters from u'\uff00' to u'\uff0f'. > the code below and get a TypeError. > p = re.compile(u'\uff00'-u'\uff0f') That is not a valid regex. It is an attempt to subtract one unicode char from another, but this is (correctly)

Re: how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread MacDonald
yichao.zhang wrote: > I'm trying to match the characters from u'\uff00' to u'\uff0f'. > the code below and get a TypeError. > p = re.compile(u'\uff00'-u'\uff0f') > Traceback (most recent call last): > File "", line 1, in ? > TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode' >

how to match u'\uff00' - u'\uff0f' in re module?

2006-07-10 Thread yichao.zhang
I'm trying to match the characters from u'\uff00' to u'\uff0f'. the code below and get a TypeError. p = re.compile(u'\uff00'-u'\uff0f') Traceback (most recent call last): File "", line 1, in ? TypeError: unsupported operand type(s) for -: 'unicode' and 'unicode' so re module does NOT support th