Skip to content

Instantly share code, notes, and snippets.

@raspo
Created March 11, 2012 12:34
Show Gist options
  • Save raspo/2016273 to your computer and use it in GitHub Desktop.
Save raspo/2016273 to your computer and use it in GitHub Desktop.
Get numbers from a string (simple regex)
'asd123'.match(/\d+$/) // 123
'asd123asd'.match(/\d+/) // 123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment