[EMAIL PROTECTED] skrev: > how can I extract 2 integers from a string in python? > > for example, my source string is this: > Total size: 173233 (371587) > > I want to extract the integer 173233 and 371587 from that > soource string, how can I do that?
E.g.: #v+ >>> import re >>> re.findall(r'\d+', 'Total size: 173233 (371587)') ['173233', '371587'] >>> #v- Mvh, -- Klaus Alexander Seistrup Copenhagen, Denmark http://surdej.dk/ -- http://mail.python.org/mailman/listinfo/python-list