dcsimg
 

Submitted by: Srinath M S(srinath_ms@yahoo.com)

Friday Dec 27th 2019 by Srinath M S

Language: Web, Expertise: Intermediate - See how to extract digits from a string in Python using a regular expression.

See how to extract digits from a string in Python using a regular expression.

import re

inputString = 'QuinStreet2019Year'

result = re.sub("\D", "", inputString) 
Home
Mobile Site | Full Site