I have problem to write a regex to remove a special and duplicated character from a string in javascript. Because I need to compare the date like type of this
2015-11-05-14:30
so I'm going to transform the date string into integer number
201511051430
and make it comparable. And so, I need to remove the character "-" & ":" !
str.replace(/[-:]/g,'');Fiddle