I got it to work!
Here's my rule:
full L_TEST /(\b(best|most|more|((best|bett|bigg|larg|fast|quick)(er|est)))\b.*){3}/is
describe L_TEST Test
score L_TEST 0.01
I sent myself an email with the text:
We are the biggest!
We are the fastest!
We are the best!
And it tripped!
Notice, though, that instead of just looking for 4 occurances, I was looking for 3. It is the "s" at the end that causes it to treat newlines as any other character.
Al Danks wrote:
From perlre manual (perldoc perlre or man perlre):m Treat string as multiple lines.
s Treat string as single line. That is, change "." to match any
character whatsoever, even a newline, which normally it would not
match.
Eugene,
How would I modify the rule to use the m or s?
full /(\b(best|most|more|((best|bett|bigg|larg|fast|quick)(er|est)))\b.*){4}/i
Al
