Skip to content

Instantly share code, notes, and snippets.

@igorcosta
Created June 27, 2014 18:21
Show Gist options
  • Select an option

  • Save igorcosta/8a7e3e9ff4e7e6ea088d to your computer and use it in GitHub Desktop.

Select an option

Save igorcosta/8a7e3e9ff4e7e6ea088d to your computer and use it in GitHub Desktop.
Removing all chars from a masked input and considering only numbers
var str = value.replace(/[^0-9]+/g,'');
return str;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment