[prev in list] [next in list] [prev in thread] [next in thread]
List: perl5-porters
Subject: Re: ? RFC: Should a utf8 regex pattern with the /d modifier have
From: Abigail <abigail () abigail ! be>
Date: 2010-11-29 20:18:34
Message-ID: 20101129201834.GA18489 () almanda
[Download RAW message or body]
On Mon, Nov 29, 2010 at 01:06:46PM -0700, karl williamson wrote:
> Abigail wrote:
>>
>> So, this will be fixed?
>>
>> my $e = "\xE8";
>> my $re = "\N{WHITE SMILING FACE}";
>>
>> say $e =~ /[\w$re]/ ? "Match" : "No match";
>> say $e =~ /\w|$re/ ? "Match" : "No match";
>>
>> __END__
>> Match
>> No match
>>
>>
> Well, in my undelivered code space they both match. I don't understand
> what the Match/No match is after the __END__. If you think they should
> return different values, please explain.
The output after the end is the output if you run the code in 5.12.x.
Which is a bug, as they should both match (assuming one wants UTF-8
matching semantcis if at least one of the subject and regex has the
UTF-8 flag set).
Abigail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic