0

Just want to ask help from regex experts. Here's my case:

In mysql, I can do text filtering using LIKE operator like this Changed STATUS from%PAID IN FULL which can search strings containing something in between those exact text I have specified: Which can search like:

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

but not

 lllbozeman@aol.com send confirmation paid in full.
 email paid in full letter when paid off

In PHP regex how can I do that?

Mark Byers
  • 811,555
  • 193
  • 1,581
  • 1,452
  • 1
    Does this help? [PHP startsWith() and endsWith() functions](http://stackoverflow.com/questions/834303/php-startswith-and-endswith-functions) – Mark Byers Dec 24 '12 at 00:54

1 Answers1

0

Use

~Changed STATUS from(.*?)PAID IN FULL~

If you want it to be case insensitive put an i after the second ~

Also note the parentheses are optional - they're if you want to capture the text between it (it will capture to group 1)

Jay Gilford
  • 15,141
  • 5
  • 37
  • 56