regexmatch.mlton

Stephen Weeks MLton@sourcelight.com
Mon, 11 Jun 2001 23:52:40 -0700


--tLoQEmgc/S
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit


Here is regexmatch.mlton.



--tLoQEmgc/S
Content-Type: application/octet-stream
Content-Disposition: attachment;
	filename="regexmatch.mlton"
Content-Transfer-Encoding: base64

ZnVuICsrIChyOiBpbnQgcmVmKTogaW50ID0KICAgbGV0CiAgICAgIHZhbCBuID0gMSArICFyCiAg
ICAgIHZhbCBfID0gciA6PSBuCiAgIGluIG4KICAgZW5kCgpzdHJ1Y3R1cmUgSW50ID0KICAgc3Ry
dWN0CiAgICAgIG9wZW4gSW50CgogICAgICB0eXBlIHQgPSBpbnQKCSAKICAgICAgZnVuIGV4aXN0
cyAoc3RhcnQ6IHQsIHN0b3A6IHQsIGY6IHQgLT4gYm9vbCk6IGJvb2wgPQoJIGxldAoJICAgIGZ1
biBsb29wIGkgPSBpIDwgc3RvcCBhbmRhbHNvIChmIGkgb3JlbHNlIGxvb3AgKGkgKyAxKSkKCSBp
bgoJICAgIGxvb3Agc3RhcnQKCSBlbmQKCiAgICAgIGZ1biBmb3JhbGwgKHN0YXJ0LCBzdG9wLCBm
KSA9IG5vdCAoZXhpc3RzIChzdGFydCwgc3RvcCwgbm90IG8gZikpCgogICAgICBmdW4gZm9sZCAo
c3RhcnQ6IHQsIHN0b3A6IHQsIGE6ICdhLCBmOiB0ICogJ2EgLT4gJ2EpOiAnYSA9CgkgbGV0Cgkg
ICAgZnVuIGxvb3AgKGk6IHQsIGE6ICdhKSA9CgkgICAgICAgaWYgaSA+PSBzdG9wCgkJICB0aGVu
IGEKCSAgICAgICBlbHNlIGxvb3AgKGkgKyAxLCBmIChpLCBhKSkKCSBpbiBsb29wIChzdGFydCwg
YSkKCSBlbmQKCSAgICAgICAKICAgICAgZnVuIGZvciAoc3RhcnQ6IHQsIHN0b3A6IHQsIGY6IHQg
LT4gdW5pdCk6IHVuaX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