develooper Front page | perl.perl5.porters | Postings from October 2009

Re: Rule 1 has been invoked [Re: What should \s \w \d match in 5.12?]

Thread Previous | Thread Next
From:
demerphq
Date:
October 28, 2009 06:51
Subject:
Re: Rule 1 has been invoked [Re: What should \s \w \d match in 5.12?]
Message ID:
9b18b3110910280651h59c1bed1x5191a8380b217bda@mail.gmail.com
2009/10/28 Ricardo Signes <perl.p5p@rjbs.manxome.org>:
> * demerphq <demerphq@gmail.com> [2009-10-28T09:36:16]
>> The refined plan was to make it configurable, with the exception of
>> \d, which I and many believe should default to ascii semantics as
>> there are very few applications where \d matching anything else is the
>> right thing to do.
>
> As for most of the potential changes to \w and \s, I have not much opinion.  In
> all my code that expects Unicode, I have been careful, and I hope others have,
> too.
>
> As for \d, though, I am horrified to think how much bad behavior could be
> introduced if \d started to match TITLE CASE KLINGON NUMERAL CHORGH
>
> I think it is likely that I would not upgrade to a perl5 that introduced such
> behavior.  "Review every regex that uses \d" is not an acceptable burden.

What you just described is the present situation. And many people have
this bug and have done exactly what you said.

If unicode adds that codepoint, and gives it the property IsDigit then
it will start to match in some version of Perl in at least some
situations. The question is which situations those should be.

cheers,
Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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