develooper Front page | perl.perl5.porters | Postings from December 2004

Re: optimization idea

Thread Previous | Thread Next
Jarkko Hietaniemi
December 11, 2004 03:45
Re: optimization idea
Message ID:
> 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 fooxar -> # with anychar => 1

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

Jarkko Hietaniemi <> "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About