Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

extract float from string python

>>> re.findall(r"[-+]?d*.d+|d+", "Current Level: -13.2 db or 14.2 or 3")
['-13.2', '14.2', '3']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #extract #float #string #python
ADD COMMENT
Topic
Name
1+4 =