python Read N integers until first character

try python’s re module . sorry the code is written in python2.7

from re import findall

listOfStrings=['asjkf1234alksfl293487293084','9832alkdjsf03940930i2304093','9lads92387498327409']

for v in listOfStrings:
    res=findall(r'\d+',v)
    print res[0]

Leave a Comment