字符串操作替换

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