------art_139979_9063641.1186572480423
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

2007/8/7, Ari Brown <ari / aribrown.com>:
> Please people, send an email if you want to see something in a Ruby
> RegExp wrapper. Don't be shy. If i can get drafted into making this,
> then you can tell me what you want to see.

Did you think about something like this (attached)?  This is just a
raw hack to illustrate a possible way to do it.

Kind regards

robert

------art_139979_9063641.1186572480423
Content-Type: application/x-ruby; name="textual-rx.rb"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="textual-rx.rb"
X-Attachment-Id: f_f53qm4x2

IyFydWJ5CgpjbGFzcyBUZXh0dWFsUmVnZXhwCiAgZGVmIGluaXRpYWxpemUoZmxhZ3MgPSAwLCAm
YikKICAgIEBidWZmZXIgPSAiIgogICAgQGZsYWdzID0gZmxhZ3MKICAgIEBncm91cHMgPSAwCgog
ICAgaWYgYgogICAgICBpbnN0YW5jZV9ldmFsKCZiKQogICAgICBmaW5pc2gKICAgIGVuZAogIGVu
ZAoKICAjIGNvbnN0cnVjdGlvbgoKICBkZWYgdGV4dChzKQogICAgdXBkYXRlIGRvCiAgICAgIEBi
dWZmZXIgPDwgUmVnZXhwLmVzY2FwZShzKQogICAgZW5kCiAgZW5kCiAgCiAgYWxpYXMgbGl0ZXJh
bCB0ZXh0CiAgCiAgZGVmIGNhc2VfaW5zZW5zaXRpdmUoJmIpCiAgICB1cGRhdGUgZG8KICAgICAg
QGJ1ZmZlciA8PCAiKD9pOiIKICAgICAgaW5zdGFuY2VfZXZhbCgmYikKICAgICAgQGJ1ZmZlIDw8
ICIpIgogICAgZW5kCiAgZW5kCiAgCiAgZGVmIGNhc2Vfc2Vuc2l0aXZlKCZiKQogICAgdXBkYXRl
IGRvCiAgICAgIEBidWZmZXIgPDwgIig/LWk6IgogICAgICBpbnN0YW5jZV9ldmFsKCZiKQogICAg
ICBAYnVmZmUgPDwgIikiCiAgICBlbmQKICBlbmQKCiAgZGVmIGdyb3VwKG1vZGU9Om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ICAgICAgICJcXEEiCiAgICAgICAgd2hl
biA6ZW5kCiAgICAgICAgICAiXFx6IgogICAgICAgIHdoZW4gOndvcmQKICAgICAgICAgICJcXGIi
CiAgICAgICAgd2hlbiA6ZW9sLCA6ZW5kX29mX2xpbmUKICAgICAgICAgICIkIgogICAgICAgIGVs
c2UKICAgICAgICAgIHJhaXNlICJJbGxlZ2FsIGFuY2hvciAje3doZXJlfSIKICAgICAgZW5kCiAg
ICBlbmQKICBlbmQKCiAgZGVmIGZpbmlzaAogICAgQHJ4ID0gUmVnZXhwLm5ldyhAYnVmZmVyLCBA
ZmxhZ3MpCiAgICBmcmVlemUKICBlbmQKICAKICAjIHVzYWdlCiAgCiAgZGVmIHJ4OyBAcnggZW5k
CgogIGRlZiBncm91cHM7IEBncm91cHMgZW5kCgogIGRlZiByYXdfcngKICAgIEBidWZmZXIKICBl
bmQKICAKICBkZWYgdG9fcwogICAgcngudG9fcwogIGVuZAogIAogIGRlZiBzY2FuKHMsICZiKQog
ICAgcy5zY2FuKHJ4LCAmYikKICBlbmQKCiAgZGVmIHNwbGl0KHMsICZiKQogICAgcy5zcGxpdChy
eCwgJmIpCiAgZW5kCgpwcml2YXRlCiAgZGVmIHVwZGF0ZQogICAgcmFpc2UgIkltbXV0YWJsZSIg
aWYgZnJvemVuPwogICAgeWllbGQKICAgIHNlbGYKICBlbmQKICAKICBkZWYgY29sbGVjdF9yeChi
KQogICAgVHhDb2xsZWN0b3IubmV3KGIpLnJhd19yeAogIGVuZAogIAogIGNsYXNzIFR4Q29sbGVj
dG9yCiAgICBkZWYgaW5pdGlhbGl6ZShiKQogICAgICBAcnggPSBbXQogICAgICBpbnN0YW5jZV9l
dmFsKCZiKQogICAgZW5kCiAgICAKICAgIGRlZiBtZXRob2RfbWlzc2luZygqYSwmYikKICAgICAg
dHJ4ID0gVGV4dHVhbFJlZ2V4cC5uZXcKICAgICAgdHJ4LnNlbmQoKmEsJmIpCiAgICAgIEByeCA8
PCB0cngKICAgICAgc2V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