On Wed, 28 May 2014, Arthur Glennie wrote:
[quote]
I'm trying to write a body rule that will catch an email exactly
containing any number of characters up to 15, followed by a URI,
followed by any number of characters, up to 15. My attempt has failed
miserably, and hoped someone could help.
[/quote]
This should work for you:
Body LOC_SHORT_BODY_URI /^.{0,15}(?:http\:\/\/.{1,}).{0,15}$/i
That's going to do a bunch of backtracking. And the grouping isn't needed
as you're not doing alternation or repetition.
Also, that will match a message containing such a line, as well as a
message containing such a line plus any other content.
Important question: how do you define the end of the URI?
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhar...@impsec.org FALaholic #11174 pgpk -a jhar...@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
9 days until the 70th anniversary of D-Day