Re: Re: Regular Expression question

2006-06-07 Thread
I'm sorry! I mean pattern is an argument of the function, in this case, how I process special charactors.    patter = 'www.'   # not this     if re.compile(pattern).match(string) is not None:     ..   but not:       if re.compile(r'www.').match(string) is not None

Re: Re: Regular expression - dot problem!

2006-06-07 Thread
Fredrik Lundh <[EMAIL PROTECTED]> wrote:李政 wrote:> I've a problem with regular express(dot problem). I checked Python > Library Reference, but i can't find any infomation that is useful.like what a dot means in a regular _expression_? you really need to workon your google

Regular expression - dot problem!

2006-06-07 Thread
Hi,   I've a problem with regular express(dot problem). I checked Python Library Reference, but i can't find any infomation that is useful . Nor did Google. They have the same way:     re.compile(''www").match(string).   It always works better. But my pattern string must be an arg