我希望匹配包含至少一个强制字符和允许字符的整个单词.
例如
强制字符是:[t,a,x]
允许的字符是:[i,e]
t : passed (one of mandatories are here)
tea : passed (two of mandatories(t,a) and one allowed(e) here)
e : failed (none of mandatory is here)
teas : failed (two of mandatories(t,a) and one allowed(e) here but one intruder(s))
Run Code Online (Sandbox Code Playgroud)
什么是适当的REGEX代码?它将用于搜索12.000行的MySQL表,每行包含一个单词作为PHP项目.
让我帮助你自己,而不是给出一个直接的答案.通过的单词由以下序列组成:
为这些中的每一个写正则表达式,然后将它们连接起来以获得整个事物的正则表达式.
| 归档时间: |
|
| 查看次数: |
559 次 |
| 最近记录: |