On Wed, 2009-07-15 at 14:24 -0400, Charles Gregory wrote:
> Please ignore. I use a generator. To avoid needless discussion of its 
> syntax, here are the actual rules from my generated .cf file...

Actually, in this very rule, the negative look-ahead is useless and
won't match the remaining part of the RE anyway. All spaces inserted for
readability.

> body      LOC_09061901 /(?!www\.[a-z]{2,3}[0-9]{2,3}\.(?:com|net|org))
> www (?: [^\.][^a-z0-9]{0,9} | \.[^a-z0-9]{1,9} ) (?:[a-z]{2,3}|pill|meds|shop)

'www' followed by either  (a) any char but a dot, followed by up to 9
non-alphanumeric chars, or  (b) a dot, followed by at least one and up
to 9 non-alphanumeric chars. Then it goes on with the domain part.

Neither (a) nor (b) can match the negative look-ahead, which is a single
dot after the www, followed immediately by the domain part, which starts
with an alpha char.


Given that the negative look-ahead actually does nothing, but yet
prevents the RE from matching when added -- this either is a bug with
your Perl (assuming the ONLY difference is the added negative look-
ahead), or the assumption doesn't hold and the REs actually are not
identical.

  guenther


-- 
char *t="\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
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; }}}

Reply via email to