On 13/04/15 19:42, Alan Gauld wrote:

         if lines.startswith("Input"):
             tp = lines.split("\t")
             print re.findall("Input\d",str(tp))

Input is not followed by a number. You need a more powerful pattern.
Which is why I recommend trying to solve it as far as possible
without using regex.

I also just realised that you call split there then take the str() of the result. That means you are searching the string representation
of a list, which doesn't seem to make much sense?


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to