Skip to content

Instantly share code, notes, and snippets.

@GeauxEric
Created February 19, 2016 16:54
Show Gist options
  • Save GeauxEric/52eca45355e01aadce17 to your computer and use it in GitHub Desktop.
Save GeauxEric/52eca45355e01aadce17 to your computer and use it in GitHub Desktop.
regular expression to find all float number in a string
s = u'(-1.234, 12]'
import re
print re.findall(r'[+-]?\d+\.*\d*', s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment