Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get number of string python

import re

example_str = "Here is a example number: 1234. Here is another: 5678"
number = re.findall("d+", example_str) # Get list of numbers in string
# d+ -> matches 1 or more (+) digits appearances in string
 
PREVIOUS NEXT
Tagged: #number #string #python
ADD COMMENT
Topic
Name
4+5 =