dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Web
Expertise: Intermediate
Dec 27, 2019

Extract Digits from a String in Python

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

import re

inputString = 'QuinStreet2019Year'

result = re.sub("\D", "", inputString) 
Srinath M S
 
Thanks for your registration, follow us on our social networks to keep up-to-date