On Wed, 2008-08-27 at 21:00 +0000, Duane Hill wrote: > On Wed, 27 Aug 2008, Skip wrote:
> > Tell me, where did you get the SG_EXECUTABLE_URI rule? I don't have it in > > my > > installation. > It was a rule that was posted to the list close to a week ago by Phil > Randal (thread subject: e greeting exe link). I just changed its name: I didn't write this back then, even though I intended to -- but since this is a recurring topic, here it finally goes. :) > uri MY_EXECUTABLE_URI > /^(?:https?|ftp):\/\/[^\s?]{1,80}\/[^\s?]{1,80}\.(?:exe|scr|dll|pif|vbs|wsh|cmd|bat)$/i I believe this to be overly complex and complicated. Why all this limitations and being that specific? There is no need to match the entire URL. Actually, there is no need to match anything you actually aren't interested in -- which is the extension. :) What about this? uri EXECUTABLE /\.(?:exe|scr|dll|pif|vbs|wsh|cmd|bat)$/i Beware. Untested. Isn't that much more easily readable and comprehensible? And while I'm already at it, if you want to match slash chars (as often the case with uri tests), just use a different RE delimiter, to avoid the fences and enhance readability. uri EXAMPLE_NET m,^https?://example.net/, Hope this helps maintaining your custom cf files. guenther -- char *t="[EMAIL PROTECTED]"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}