> > >>>>category = m.group(1) > > > > > > Traceback (most recent call last): > > > File "<stdin>", line 1, in ? > > > AttributeError: 'NoneType' object has no attribute 'group' > > > > In this case the match failed, so m is None and m.group(1) gives an > >error. > > So my problem is in the actual regex? I`ve been trying to match other > pieces of data with no luck. I`ll double check the formatting in the > HTML to see if that is the problem.
Yeah, the regular expression must be fully satisfied, or it won't match at all. It's very discriminating; since you're learning about programming, you already are getting to know that computers are very discriminating and stupid. *grin* _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor