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
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
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