Regex: match and replace on a date
I'd like to convert the date separators in a date.
So, from 11.11.2009 -> 11-11-2009
Could so开发者_如何学Cmeone help me do that with a regex?
my_date = my_date.replace(/\./g, '-');
You mean '11.11.2009'.replace(/\./g, '-')
.
精彩评论