150
rated 0 times
[
155]
[
5]
/ answers: 1 / hits: 17637
/ 10 Years ago, sun, october 5, 2014, 12:00:00
I need to remove all non numeric characters except the dash.
This is my attempt (based on: Regex to get all alpha numeric fields except for comma, dash and single quote):
var stripped = mystring.replace(/[-0-9]+/g, '');
But that doesn't work :-(
More From » javascript