正则表达式格式化日期

 var str = "2016年4月11日";

str= str.replace(/[\u5e74|\u6708]/g,"-").replace(/\u65e5/g,""); 
posted @ 2016-04-11 18:19  smght  阅读(403)  评论(0编辑  收藏  举报