let res = 'aabbaaaaccdeee'.replace(/(.)\1*/g, '$1'); console.log(res)// abacde
posted on 2022-03-29 10:02 GameCat 阅读(184) 评论(0) 编辑 收藏 举报