backreference in regexp
- From: Schüle Daniel <uval@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 15:15:04 +0100
X-Enigmail-Version: 0.76.5.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
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?
Regards, Daniel
.
- Follow-Ups:
- Re: backreference in regexp
- From: Fredrik Lundh
- Re: backreference in regexp
- Prev by Date: Re: determinant
- Next by Date: Re: test whether 2 objects are equal
- Previous by thread: quoting strings
- Next by thread: Re: backreference in regexp
- Index(es):
Relevant Pages
|