Answers for "python replace non numeric characters in a string"

2

python strip non numeric in string

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

remove alphabetic characters python

numeric_answer = filter(str.isdigit, original_string)
numeric_answer = "".join(numeric_answer)
Posted by: Guest on October-31-2020

Code answers related to "python replace non numeric characters in a string"

Python Answers by Framework

Browse Popular Code Answers by Language