正则表达式:匹配XYX,其中X和Y是任何字母 由 菊花怒放发布于 2020-05-24 04:40:58 MySQLregexnode.js 收藏 有没有一种方法可以通过松散指定的模式/组合来检索字符串? 例 数据:[AAA,ABA,CAC,CCA,BCB] 输入:XYX 输出:ABA,CAC,BCB 我正在使用nodeJS + mysql 评论 请 登录后发表观点 坏pi气 2020-05-24 04:40:58 以下正则表达式可以完成这项工作: /([A-Z])[A-Z]\1/g It will look for an arbitrary capital letter, followed by another letter and a repetition of the first one. The g flag will make it applicable multiple times in a string. 点赞 评论 到底啦
以下正则表达式可以完成这项工作:
It will look for an arbitrary capital letter, followed by another letter and a repetition of the first one. The
g
flag will make it applicable multiple times in a string.