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

Re: optimization idea

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
December 11, 2004 03:45
Subject:
Re: optimization idea
Message ID:
20041211104619.GA8810@vipunen.hut.fi
> 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 <jhi@iki.fi> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About