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 E. [email protected] wrote:
The post can be found here:
http://carboni.ca/blog/p/Regex-Search-on-Arbitrary-SequencesAnd the gem can be found here:
GitHub - michaeledgar/object_regex: Perform regex searches on arbitrary sequences.The gem requires Ruby 1.9+.
Cheers,
Mike Edgar
http://carboni.ca/
–
John C. Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email :
[email protected]
New Zealand
–
John C. Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email :
[email protected]
New Zealand