> -----Original Message-----
> From: Adam D. Lopresto [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 26, 2004 3:38 PM
> To: Chris Santerre
> Cc: 'Al Danks'; [EMAIL PROTECTED]
> Subject: RE: Working rule to catch multiple occurrences of text
> 
> 
> On Fri, 26 Mar 2004, Chris Santerre wrote:
> 
> >
> > > -----Original Message-----
> > > From: Al Danks [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, March 26, 2004 11:56 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Working rule to catch multiple occurrences of text
> > >
> > >
> > > full     L_TEST
> > > /(\b(best|most|more|((best|bett|bigg|larg|fast|quick)(er|est))
> > > )\b.*){3}/is
> > >
> >
> > Well can I add a final silly tweak? :-)
> >
> > full     L_TEST
> > 
> /(\b?:(?:best|most|more|((?:best|bett|bigg|larg|fast|quick)(?:
> er|est)))\b.*)
> > {3}/is
> >
> > It is just quicker.
> 
> Hmmm.  Is "bestest" actually a spam sign?  How about 
> "Bester".  I mean, sure
> he's not the greatest guy in the world, but do you really 
> want to annoy the
> psi-corp?  I'd probably write it as (untested)
> 
> full     L_TEST 
> /(?:\b(?:be(?:st|tter)|mo(?:st|re)|(?:bigg|larg|fast|quick)e(?
> :r|st))\b.*){3}/is
> -- 
> Adam Lopresto
> http://cec.wustl.edu/~adam/
> 
> "Verbing weirds language."
>     --Bill Waterson, "Calvin and Hobbes"

Yeah that looks good. I think I had the first '?:' wrong.   Al, basically
the magic of the question mark is this:
"I don't care which of these match. I don't really care to ever use the info
again. So If one matchs, then good for you. You get a cookie, lets move on."


And so the computers says, "Gee, I have a cookie!" and forgets which pattern
matched, but just that somethng matched the regex. It is a bit faster, but
your computer tends to get a sugar high. Which isn't bad, its the coming
down from it that hurts ;)

--Chris

Reply via email to