> Apologies for tooting my own horn, but I have released Regexp::Assemble, 
> which does much the same thing, but has slightly different behaviour, it 
> merges common tails as well: fish, flash -> f(la|i)sh. The above-cited 
> pattern becomes:
> 
>    fla(?:t(?:ulent)?|bby|sh)

Toot toot.  Regex::PreSuf has been doing things like that since April
2000 and it does character classes and anychars, too :-)  Though I'm
the first to admit that my module probably has various bugs and
inefficiencies, I haven't been paying much attention to it lately.

        foobar fooxar foozap -> foo(?:zap|[bx]ar)
        foobar foo.ar fooxar -> foo.ar # with anychar => 1

Regexp::Assemble looks definitely cooler and much more general-purpose.

-- 
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this 
special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Reply via email to