On Tuesday, April 09, 2013 10:23:34 PM Chet Ramey wrote: > On 4/9/13 9:56 PM, Dan Douglas wrote: > > Erm, here it is in a less unreadable format: > > It is pretty slow. You forgot to enable `extglob'. D'oh!
Bad algorithm? I suppose it's lots of backtracking and maybe has to test every substring for every position in the string. In my version it took about .3 of a sec, but combining all that into one string with x=${a[*]}, doing the same on x took about 10 seconds. It's still 0.00 in ksh/zsh. -- Dan Douglas