在string.replace中使用具名组匹配
摘要:
let reg = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/; let re = '2015-01-02'. replace (reg , ( matched,//整个匹配结果 capture1, capture2, capture3, posit 阅读全文
posted @ 2020-03-24 15:35 冯亮 阅读(178) 评论(0) 推荐(0) 编辑