Ack! I must've read the same thing, because I wrote something along the same lines. I was going to finish writing the POD this weekend and post to CLPM, to upload to CPAN later. (My first upload to CPAN!)

There are two main differences that I can see right now. First, I called mine Regexp::Wordy (with a P ;-) based on the idea that it was using words instead of symbols to describe regexes. Although it is in English.

Second, I avoided using OO style. My rationale was that this would mainly be of use to newbies, so I wanted to keep things as simple as possible. If you haven't got the hang of /^\s+[a-m]*\d{3}/, you'd probably be intimidated by the $foo->Regex::Wordy stuff too. If I'm reading your example right, with this module you would render it as:

use Regexp::Wordy qw(:all); if ('1998/10/08 [11:10]' =~ regexp( at_bol, clean('1998/10/08'), any_number(space), clean('['), remember( one_or_more( either(':', digit))), nondigit)) { print "Found a match at time $1\n"; }
As you can see, some things are still clumsy. I didn't think about passing in a ref to be set instead of $1, etc.

I'd be glad to send you what I have, but I couldn't find an address on your home node or web site. I have an obfuscated address on my home node if you'd like to email me instead.


In reply to Re: Pondering Regex::English by VSarkiss
in thread Pondering Regex::English by chromatic

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.