From: Robert Dober Date: 2007-04-12T04:47:52+09:00 Subject: Re: Slow ruby regexes On 4/11/07, Ola Bini wrote: > Robert Dober wrote: > > > > > > stupid me make this simply /a*.*a/ sorry > Actually, to make it non-backtracking, you just need to update all the > possible states at the same time. It's quite easy. Just look for > Thompson NFA for a closer look at it. > The problem is that it gets problematic with backREFERENCES. That's the > main problem that is currently solved with backtracking implementations. > Thx Ola, I'll look it up. > What Mentalguy said is basically that there should be better ways of > implementing regex engines with backreferences. Since you don't use > backreferences so often, you could have Thompson NFA for those cases > where it's fast, and switch to a backtracking engine only when you need it. Yeah I was not concerned with the backreferences, just trying to understand the basic stuff ;) > > Cheers > > -- Robert -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw