From: Gavin Kistner Date: 2005-09-14T21:44:06+09:00 Subject: Re: strings and regex's On Sep 13, 2005, at 9:06 PM, jdm wrote: > I'm parsing some html and have a table-driven state machine that > configures > itself by reading tuples (one per line) of "present state", > "pattern to match", > and "next state" with this code: Just an aside - you might be interested in my TagTreeScanner class, just to look at. http://phrogz.net/RubyLibs/OWLScribble/doc/tts.html (I still need to finish and upload the version with the nicer DSL setup. But at its heart, it's a state machine running regexp against strings to determine the next state (and build a tree along the way).)