Skip to content

Instantly share code, notes, and snippets.

@sr75
Created March 21, 2012 13:37
Show Gist options
  • Save sr75/2146937 to your computer and use it in GitHub Desktop.
Save sr75/2146937 to your computer and use it in GitHub Desktop.
parse decimal from string example method
def parse_decimal_from_string(value)
value.scan(/[-+]?\d*\.?\d+/).join('')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment