只想向正则表达专家寻求帮助。这是我的情况:
在mysql中,我可以使用LIKE运算符进行文本过滤,例如从%PAID IN FULL 更改状态,这可以搜索包含我指定的那些确切文本之间的内容的字符串:可以搜索如下:
Changed STATUS from PROMISE TO PAY to PAID IN FULL
Changed STATUS from NEWBIZ to PAID IN FULL
Changed STATUS from CALLED IN 1ST to PAID IN FULL
Changed STATUS from NSF to PAID IN FULL
但不是
lllbozeman@aol.com send confirmation paid in full.
email paid in full letter when paid off
在PHP正则表达式中我该怎么做?
答案 0 :(得分:0)
使用
~Changed STATUS from(.*?)PAID IN FULL~
如果您希望它不区分大小写,请在第二个i
之后添加~
另请注意,括号是可选的 - 如果要捕获它们之间的文本(它将捕获到组1),它们就是可选的