At 09:38 PM 5/30/2005, Craig Jackson wrote:
Craig Jackson wrote:
m{https?://[^/\s]+?(?<!\.com)(?<!\.net)(?<!\.org)(?<!\.gov)(?<!\.us)(?<!\.edu)(?<!\.mil)(\/\[^\s])?}
This I copied from the Spamassassin test for odd ports. The logic is
similar. However I have never seen some of this notation. And of course
the test doesn't work -- too many false positives.
1) What do the enclosing {} mean?
They are the delimiters. Instead of using a pair of / to delimit the regex
they used curly braces. It's somewhat rare to see this done, but it's
sometimes convenient.
When you prefix with the match operator (that m at the beginning) you can
use almost any character you want as a delimiter instead of forward slash.
This way you can do http:// without having to escape it as http:\/\/ like
you would in most normal / delimited rule.
3) Does this work with line wrapped links?
If you do it as a uri rule, I think so. As a rawbody rule, no.
But please questions 1) and 3) above I still haven't answered.
Thanks