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

Re: Rule 1 has been invoked [Re: What should \s \w \d match in5.12?]

Thread Previous | Thread Next
From:
Graham Barr
Date:
October 29, 2009 09:45
Subject:
Re: Rule 1 has been invoked [Re: What should \s \w \d match in5.12?]
Message ID:
D97AF7B6-F690-4E7B-B759-41C05F8236B0@pobox.com

On Oct 29, 2009, at 11:39 AM, Paul LeoNerd Evans wrote:

> On Thu, 29 Oct 2009 16:24:53 +0000
> Paul LeoNerd Evans <leonerd@leonerd.org.uk> wrote:
>
>> I would suggest
>>
>> 			word	digit	space
>> ASCII-only		\w	\d	\s
>> Includes Unicode	\Uw	\Ud	\Us
>>
>> Only \U is already used. And \u.
>
> Actually then, on that note could we consider some more modifiers?
>
> ASCII:   m/\w/a   m/\d/a   m/\s/a
> Unicode: m/\w/u   m/\d/u   m/\s/u
>
> and if neither is specified keep to the existing behaviour..

I was just having a similar thought. Although I do not think we would
need both as it should be one or the other. With Unicode as the default
we would only need /a. With this qr// patterns would also carry it  
with them

Graham.


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