Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python strip non numeric in string

>>> import re
>>> re.sub("[^0-9]", "", "sdkjh987978asd098as0980a98sd")
'987978098098098'
Comment

PREVIOUS NEXT
Code Example
Python :: jinja2 datetime format 
Python :: pandas tuple from two columns 
Python :: django forms set class 
Python :: days of week 
Python :: s3fs download file python 
Python :: read_csv only certain columns 
Python :: check if special character in string python 
Python :: open pkl file python 
Python :: pytube urllib.error.HTTPError: HTTP Error 410: Gone 
Python :: how to add a image in tkinter 
Python :: check if a number is perfect cube in python 
Python :: python3 install google 
Python :: finding duplicate characters in a string python 
Python :: python savefig full screen 
Python :: change date format python 
Python :: python auto clicker 
Python :: numpy install with pip 
Python :: clearing all text from a file in python 
Python :: password generator python 
Python :: python: change column name 
Python :: python program to shutdown computer when user is not present 
Python :: how to save a png seaborn pandas 
Python :: seaborn axis limits 
Python :: pygame draw line 
Python :: SettingWithCopyWarning 
Python :: python selenium switch to window 
Python :: python requirments.txt 
Python :: selenium-screenshot python 
Python :: django today date in template 
Python :: getting dummies and input them to pandas dataframe 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =