Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@wellington1993
Created May 21, 2018 19:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wellington1993/f9eb841062b058a646cb32b83380f0dd to your computer and use it in GitHub Desktop.
Save wellington1993/f9eb841062b058a646cb32b83380f0dd to your computer and use it in GitHub Desktop.
Extract number from string Ruby
new_num = old_num.scan(/\d/).join('')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment