Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get int from string

>>> import re
>>> string1 = "498results should get"
>>> int(re.search(r'd+', string1).group())
498
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #int #string
ADD COMMENT
Topic
Name
2+1 =