From: Robert Klemme Date: 2008-09-23T00:10:31+09:00 Subject: Re: short regexp question 2008/9/22 Tod Beardsley : > Anyway, I think the moral of this particular long-missing story is, if > you can regex test for smaller anchors first, you can then fail to > match much faster. IOW: > > matched =false > if str.match(/b/) > matched = true if str.match(/a[^b]*b/) > end > matched I am not sure. This approach is likely slower than a single fast RX - at least if you expect matches most of the time. It all depends... Kind regards robert -- use.inject do |as, often| as.you_can - without end