On Wed, 2010-02-17 at 10:55 -0800, John Hardin wrote:
> That's where I started this, and then I ran into a situation where I 
> wanted to collapse whitespace, at which point things went south.

Hmm... Collapsing whitespace. Going back to the original RE, and what it
probably was meant to be. "A minimum of 175 chars other than [:;] before
the tag closing, with any whitespace ignored."

  /(?:\s*[^\s:;<]){175}/

What about that, then? :)  Unlike the original, this one simply swallows
any whitespace and operates on a minimum number of non-whitespace, non-
style definition syntax (very basic set). Whereas the original RE
happily would have accepted 1*175, up until 20*175 chars of pure
whitespace. Hardly gibberish, but just a waste of bandwidth. ;)


-- 
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