develooper Front page | perl.perl5.porters | Postings from February 2007

Re: unicode regex performance (was Re: Future Perl development)

February 8, 2007 04:38
Re: unicode regex performance (was Re: Future Perl development)
Message ID:
On 2/8/07, Juerd Waalboer <> wrote:
> demerphq skribis 2007-02-08 13:19 (+0100):
> > >By the way - I retract that a pragma would be good. I should have
> > >proposed a regex flag. Unfortunately, /i (ignorant mode) is taken, so
> > >perhaps /d (dumb) or /n (naive).
> > Eeek. New modifiers are trouble.
> > Id prefer to see this happen automatically when the pattern is utf8
> > and exact and doesnt use charclasses or anything that needs true
> > character semantics.
> Isn't doing this automatically very very dangerous, because pos() no
> longer makes any sense once you start using byte semantics on character
> strings?

Not sure. Since pos would only be updated on a successful match, and
both the pattern and string would be in utf8 doesnt it mean that the
pos would be set to a valid utf8 sequence start?


perl -Mre=debug -e "/just|another|perl|hacker/" Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About