
By the way, if what you're actually looking for on a high level is a Haskell-like string matching engine, it might be better to go back to the original sources. Look up Kleene's work on string pattern matching; while regexes derive from it, its more direct descendants are the pattern matching mechanisms in SNOBOL and Icon. I've thought for a while that the right way to do it in Haskell is not parsing a program encoded as a string/regex, but instead a monadic "Kleene machine"; but I've never managed to work out a decent functional implementation (too many irons in the fire, not enough spoons to even keep track of them much less do something useful with them). -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms