「前端」B站评论/弹幕过滤器

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/qq_26377547/article/details/96362624
    regexpTaobao = regexp.MustCompile(`¥([\w\s]+)¥`)
    regexpURL = regexp.MustCompile(`(?:http|https|www)(?:[\s\.:\/\/]{1,})([\w%+:\s\/\.?=]{1,})`)
    regexpWhitelist = regexp.MustCompile(`((acg|im9|bili|gov).*(com|html|cn|tv)|(av\d{8,}|AV\d{8,}))`)
    regexpQQ = regexp.MustCompile(`(?:[加qQ企鹅号码\s]{2,}|[群号]{1,})(?:[\x{4e00}-\x{9eff}]*)(?:[:,:]?)([\d\s]{6,})`)
    regexpWechat = regexp.MustCompile(`(?:[加+微++➕薇?vV威卫星♥❤姓xX信]{2,}|weixin|weix)(?:[,❤️.\s]?)(?:[\x{4e00}-\x{9eff}]?)(?:[:,:]?)([\w\s]{6,})`)

猜你喜欢

转载自blog.csdn.net/qq_26377547/article/details/96362624