Answers for "python strip all but numbers"

2

python strip non numeric in string

>>> import re
>>> re.sub("[^0-9]", "", "sdkjh987978asd098as0980a98sd")
'987978098098098'
Posted by: Guest on September-28-2020
1

python remove all except numbers

>>> import re
>>> re.sub('D', '', 'aas30dsa20')
'3020'
Posted by: Guest on April-29-2020

Code answers related to "python strip all but numbers"

Python Answers by Framework

Browse Popular Code Answers by Language