Re: fun programming problem

2009-11-10 Thread Jay Savage
On Mon, Nov 9, 2009 at 9:22 PM, Matthew Sacks wrote: > > I am unabashedly posting a quiz question I have about regular expressions: > > Looking for suggestions. > > I am thinking > > 1) make the set of regular expressions into one big expression? > 2) search the seach strings, somehow, for common

Re: fun programming problem

2009-11-10 Thread Shawn H Corey
Rob Coops wrote: > I have to agree with Shawn, as you follow the tree branch by branch you get > to the final match, the total number of checks required should on average be > lower then it is when checking every single regex, which you would have to > do for every string that does not match anythi

Re: fun programming problem

2009-11-10 Thread Rob Coops
On Tue, Nov 10, 2009 at 6:08 AM, Shawn H Corey wrote: > Matthew Sacks wrote: > > I am unabashedly posting a quiz question I have about regular > expressions: > > > > Looking for suggestions. > > > > I am thinking > > > > 1) make the set of regular expressions into one big expression? > > 2) search

Re: fun programming problem

2009-11-09 Thread Shawn H Corey
Matthew Sacks wrote: > I am unabashedly posting a quiz question I have about regular expressions: > > Looking for suggestions. > > I am thinking > > 1) make the set of regular expressions into one big expression? > 2) search the seach strings, somehow, for common substrings. "acme.org" > would

fun programming problem

2009-11-09 Thread Matthew Sacks
I am unabashedly posting a quiz question I have about regular expressions: Looking for suggestions. I am thinking 1) make the set of regular expressions into one big expression? 2) search the seach strings, somehow, for common substrings.  "acme.org" would be example. Each hit on acme.org woul