<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=koi8-r">
<META content="MSHTML 5.50.4922.900" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a question about regular expression
matching. Consider the following:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32
bit (Intel)] on win32<BR>Type "copyright", "credits" or "license" for more
information.<BR>IDLE 0.8 -- press F1 for help<BR>>>> import
re<BR>>>> re.match(r'((a)5)*(abc)', 'abc').groups()<BR>(None, 'a',
'abc')<BR>>>> </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would think that I would get (None, None,
'abc') since ((a)5)* would not match even once.</FONT></DIV>
<DIV><FONT face=Arial size=2>Can anyone explain how regular expression engine
matches this expression?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you,</FONT></DIV>
<DIV><FONT face=Arial size=2>Eugene</FONT></DIV>
<DIV><FONT face=Arial
size=2>eyakubovich@cccglobal.com</FONT></DIV></BODY></HTML>