From: "Mauricio Fernández" Date: 2004-11-19T05:19:04+09:00 Subject: Re: Tales of the Regex (Re: About Regular Expressions) On Fri, Nov 19, 2004 at 04:26:08AM +0900, James Britt wrote: > One a side note, I wonder what it would take to write a domain language, > parable by Ruby, that let one write REs in plain-ish English? Maybe > take some of the mystery out of regular expressions for most of the > common cases. (Or would that just get people dependent on too much > hand-holding?) > Take a look at Florian Gro�' Regexp::English. Short example: http://www.rubycookbook.org/cookbook/view/ReadableRegularExpressions Also Simon Strandgaard's re might interest you; you can do things like >> puts /ab|cd(?=x)|xxx/.tree +-Alternation +-Sequence | +-Inside set="a" | +-Inside set="b" +-Sequence | +-Inside set="c" | +-Inside set="d" | +-Lookahead positive | +-Inside set="x" +-Sequence +-Inside set="x" +-Inside set="x" +-Inside set="x" => nil -- Hassle-free packages for Ruby? RPA is available from http://www.rubyarchive.org/