python remove all except numbers

27

>>> import re
>>> re.sub('\D', '', 'aas30dsa20')
'3020'

Comments

Submit
0 Comments