<div dir="ltr">By the way, if what you&#39;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&#39;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&#39;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 &quot;Kleene machine&quot;; but I&#39;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).<br clear="all">
<div><br></div>-- <br>brandon s allbery                                      <a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a><br>wandering unix systems administrator (available)     (412) 475-9364 vm/sms<br>
<br>
</div>