摘要: 后端需要数据与自己获取数据不一致时,用正则很方便 let str = 2021年09月29日; let reg = /(\d{4})\年(\d{2})\月(\d{2})日/; str.replace(reg, "$1-$2-$3") //可以得到2021-09-29 阅读全文
posted @ 2021-09-29 09:53 奇函数 阅读(25) 评论(0) 推荐(0)