From: ptkwt@... (Phil Tomson) Date: 2005-08-21T03:11:16+09:00 Subject: Re: object pattern matching In article <43076BDE.2070103@neurogami.com>, James Britt wrote: >Ara.T.Howard wrote: >> On Sun, 21 Aug 2005, James Britt wrote: >> >>> ... >>> >>> Isn't there a Ruby project that allows one to run regexen over object >>> hierarchies? >> >> >> dunno... i seem to recall something too but searching the raa didn't >> bring up >> any hits? >> > >I was selling some folks on Ruby recently, and mentioned this project, >and I swore I had saved off the initial announcement because it struck >me as one of those things that did solve any immediate problems but >seemed so slick that I knew it would come in handy. > > >Now I can't find it. :( > > I think you're looking for Reg: http://rubyforge.org/projects/reg/ Reg is a library for pattern matching in ruby data structures. Reg provides Regexp-like match and match-and-replace for all data structures (particularly Arrays, Objects, and Hashes), not just Strings. Phil