我想匹配包含至少一个强制字符和允许字符的整个单词。
例如
强制字符是:[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))
什么是合适的正则表达式代码?它将用于搜索 12.000 行 MySQL 表,其中每行包含一个单词作为 PHP 项目。