字符串操作替换

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