logo科技微讯

Regex 的 lookbehind 和 lookahead

作者:科技微讯
日期:2020-11-30
📝 笔记
const lookbehind = "abcbc".replace(/(?<=a)b/g, "0");
const lookahead = "ababc".replace(/b(?=c)/g, "0");
console.log(lookbehind, lookahead); // a0cbc aba0c

正则,look ahead,look behind,regex


相关文章:

donation赞赏
thumbsup0
thumbsdown0
暂无评论