Python in Hydrology and Hydraulics
Python programming, with examples in hydraulic engineering and in hydrology.
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)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment