From: Robert Dober Date: 2007-04-11T03:56:28+09:00 Subject: Re: Slow ruby regexes On 4/10/07, MenTaLguY wrote: > On Wed, 11 Apr 2007 02:59:29 +0900, SonOfLilit wrote: > > Read wikipedia on Regex. It explains better than I can why one is used > > over the other (more power). > > It's unfortunate, though, that an NFA-based approach isn't selectively used for those expressions which don't use features like backreferences (i.e. the majority of regular expressions people write). The performance is so much better it's not funny. > Well the good news is that Ruby 2 Regexs will be much better performing, I do not know if they will be NFA, though. The bad news is that the power of regexs will just not let you escape with bad design all the time, so knowing a lot about regexes is a necessary thing to use them well. But you are right of course that Ruby's current Regex implementation is not state of the art, useful, very useful nevertheless. Cheers Robert > -mental > > > > -- You see things; and you say Why? But I dream things that never were; and I say Why not? -- George Bernard Shaw