Anyone else getting these? ---------- Forwarded message ---------- From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Sun, 13 Feb 2005 17:59:35 -0800 Subject: Delivery Status Notification (Failure) To: [EMAIL PROTECTED]
This is an automatically generated Delivery Status Notification. Delivery to the following recipients failed. [EMAIL PROTECTED] Final-Recipient: rfc822;[EMAIL PROTECTED] Action: failed Status: 5.0.0 Diagnostic-Code: smtp;554 5.0.0 MAIL REFUSED!From Dictionary Attack Spammer. ---------- Forwarded message ---------- From: Liam Clarke <[EMAIL PROTECTED]> To: Tutor Tutor <tutor@python.org> Date: Mon, 14 Feb 2005 15:09:24 +1300 Subject: Re: [Tutor] error message I was wondering about that also, I've only ever used .group() when I've got named groups using (?P<foo>) On Sun, 13 Feb 2005 21:04:22 -0500, Jacob S. <[EMAIL PROTECTED]> wrote: > Dive into Python, an excellent tutorial has a case study on this very same > topic. > > The biggest problem that nobody has mentioned yet is the fact that group() > will not have anything unless you explicitly tell it to group it. > I.E. > > pattern = r'(\d{3})-(\d{3})-(\d{4})' > > You need the parenthesis to "capture" the groups. > > BTW, dive into python can be found here: > http://www.diveintopython.org/ > > HTH, > Jacob > > > > I'm dping something very simple in RE. > > > > Lets say I'm trying to match an American Phone number > > > > I write the code this way and try to match it: > > import re > > string = 'My phone is 410-995-1155' > > pattern = r'\d{3}-\d{3}-\d{4}' > > re.match(pattern,string).group() > > > > but I get this error message > > Traceback (most recent call last): > > File "C:/Python24/findphone", line 4, in -toplevel- > > re.match(pattern,string).group() > > AttributeError: 'NoneType' object has no attribute 'group' > > > > > > > > __________________________________ > > Do you Yahoo!? > > Take Yahoo! Mail with you! Get it on your mobile phone. > > http://mobile.yahoo.com/maildemo > > _______________________________________________ > > Tutor maillist - Tutor@python.org > > http://mail.python.org/mailman/listinfo/tutor > > > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor