hi looking for a regex solution to find a sentence/group of words in running text. Sentence sometimes be in a single line or wrapped into two lines. Please help.
When run against this text, there's a match:
The case has been closed and a report has been created.
When run against this text, however, it fails to match:
The case has been
closed and a report
has been created
I tried the following:
$t_pattern = "case has been closed";
preg_match($t_pattern, $var['subject'], $regs)
Basically, I'm searching in body of an email for the sentence to close a ticket. The response is sent from a support ticket system. Although it works when the entire sentence is one line like example 1, it fails in cases similar to example 2.