str.match(/(\w)(?:[^\1]*?\1){2}/)[1]; 我测试英文和数字都可以通过
点赞 评论

相关推荐

牛客网
牛客企业服务