Created
May 21, 2018 19:22
-
-
Save wellington1993/f9eb841062b058a646cb32b83380f0dd to your computer and use it in GitHub Desktop.
Extract number from string Ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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