记一个正则

var s = "/0228/c4935e4b-aa57-4198-b6f2-146894d1f111_450.png";
var reg = /_\d{2,3}\./g;
s = s.replace(reg, ".");
console.log(s);
posted @ 2015-02-28 18:18  zhishaofei3  阅读(98)  评论(0编辑  收藏  举报