I want to set up a state machine, in this case I am parsing a simple
scripting language using regexp, and then running
a segment of code, which might be another regexp, etc. I'd like to be be
able to specify that code in a file...

Can I feed a String like "str = a.scan(/\<cat.*?>/)"            #regexp here
is just an example ;)
into a method or any other way and have it execute?

TIA
John B