On 08/10/12 19:31, Steven D'Aprano wrote:

re.search(r'\d', 'I 8 sandwiches').start()

# returns 2

I knew there was a better way that using index
and group but I couldn't think what it was...

start() so obvious once you see it :-)

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to