Re: backreference in regexp

2006-01-31 Thread Schüle Daniel
thank you, I completely forgot that + is one of metacharacters Regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: backreference in regexp

2006-01-31 Thread Fredrik Lundh
Schüle Daniel wrote: > Hello @all, > > >>> p = re.compile(r"(\d+) = \1 + 0") > >>> p.search("123 = 123 + 0") > > 'search' returns None but I would expect it to > find 123 in group(1) > > Am I using something that is not supported by Python > RegExp engine or what is the problem with my regexp? pl