Hello,

I have code that looks something like:

self.aString = "abc123xyz"
self.theNumber = int(re.search('(\d+)',self.aString).group())

Is there a more Pythonic way of doing this? (Both the reg-ex and the Int 
coercion.)  How about when I will need to extract more than one substring?

Thank you,
:)
 



      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to