Re: Regular expression fun. Repeated matching of a group Q

2006-02-24 Thread matteosartori
Yes, it's easier to read without a doubt. I just wondered if i was failing to do what i was trying to do because it couldn't be done or because i hadn't properly understood what i was doing. Alas, it was probably the latter. Thanks for your help, M@ -- http://mail.python.org/mailman/listinfo/py

Re: Regular expression fun. Repeated matching of a group Q

2006-02-24 Thread matteosartori
Thanks, The date = sanesplit[1] line complains about the "list index being out of range", which is probably due to the fact that not all lines have the in them, something i didn't explain in the previous post. I'd need some way of ensuring, as with the pattern I'd concocted, that a valid line ac

Regular expression fun. Repeated matching of a group Q

2006-02-24 Thread matteosartori
Hi all, I've spent all morning trying to work this one out: I've got the following string: 04/01/2006Wednesday 09:1412:4412:5017:5808:14 from which I'm attempting to extract the date, and the five times from into a list. Only the very last time is guaranteed to be there so it should also wo