字符串操作替换

let str = '2018-01-01';
str.replace(/[-]/g,'/');//2018/01/01
posted @ 2022-09-01 08:56  SultanST  阅读(17)  评论(0)    收藏  举报