--0050450143e7ba2cbc049b2b1c99 Content-Type: text/plain; charset=UTF-8 Very Nice! It's a very handy and powerful technique. And I really like the way you have generalized it to "all objects" I have used that technique twice before... Once decades ago I used it to recognised the longest possible straight line sequence of pixel boundaries to do raster to vector conversion in a exact and near optimal manner. More recently I "meta'd" it to step up a lexer to a grammar parser with LittleLexer. http://littlelexer.rubyforge.org/ On Tue, Feb 1, 2011 at 6:22 AM, Michael Edgar <adgar / carboni.ca> wrote: > Good day Rubyists, > > I've just finished a write-up on an interesting problem: using Ruby's > Regexp engine > to search arbitrary sequences of potentially heterogenous objects. It's > based on the > more specific instance used in Ripper in 1.9. I've packaged it into a gem > though it is > a bit rough around the edges. > > The post can be found here: > http://carboni.ca/blog/p/Regex-Search-on-Arbitrary-Sequences > > And the gem can be found here: > https://github.com/michaeledgar/object_regex > > The gem requires Ruby 1.9+. > > Cheers, > Mike Edgar > http://carboni.ca/ -- John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter / taitradio.com New Zealand -- John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter / taitradio.com New Zealand This email, including any attachments, is only for the intended addressee. It is subject to copyright, is confidential and may be the subject of legal or other privilege, none of which is waived or lost by reason of this transmission. If the receiver is not the intended addressee, please accept our apologies, notify us by return, delete all copies and perform no other act on the email. Unfortunately, we cannot warrant that the email has not been altered or corrupted during transmission. --0050450143e7ba2cbc049b2b1c99--