From: Thomas Hurst Date: 2002-03-01T23:33:30+09:00 Subject: Re: Ruby Regular Expression problem * Olonichev Sergei (olonichev@scnsoft.com) wrote: > > "Yuri Leikind" wrote in message > > > Let's then convert (.)* to .* , and use (?:) to turn off > > > backreferences in the remaining bracket pair: This isn't going to help; all ?: does is turn off saving the match from (.)*, it's still running around the string trying to find a match. > > > BTW, perl handles it very fast: Perl is highly optimized and still suffers this problem on a lot of similarly badly designed re's. That's the nature of any complete regular expression engine. Maybe you should turn on RE debug output in Perl and see how it really handles it :) [SNIP 100 lines of quoting] Please quote properly. Every time I see a 1-2 line reply with 100's of lines of quoting I usually miss the reply; this especially goes for those people who leave one line replies right at the top, THEN include the entire original message. > But you know, you should not always think how to optimize your RE, > Ruby must do it for you, esp. in case when other languages do. Maybe you'd also like someone to write a professional level Go! program while they're at it? :) -- Thomas 'Freaky' Hurst - freaky@aagh.net - http://www.aagh.net/ - We're all in this alone. -- Lily Tomlin