Python in Hydrology and Hydraulics
Python programming, with examples in hydraulic engineering and in hydrology.
Showing posts with label
text string
.
Show all posts
Showing posts with label
text string
.
Show all posts
Tuesday, July 24, 2018
How to extract all numbers / floats from a string with python regex
import re
stringWithNumbers='anystring2with 6.89 numbers3.55 3.141312'
digits = re.findall("[-+]?\d+\.?\d*", stringWithNumbers)
Older Posts
Home
Subscribe to:
Posts (Atom)