develooper Front page | perl.perl5.porters | Postings from July 2012

Re: \h not equiv to [\h]

Thread Previous
From:
Karl Williamson
Date:
July 20, 2012 10:07
Subject:
Re: \h not equiv to [\h]
Message ID:
50099037.3090702@khwilliamson.com
On 07/20/2012 09:44 AM, Eric Brine wrote:
> Hi,
>
> Is this a known bug?

Not to me it wasn't.  Ouch


>
>      $ perl -le'print "\xA0" =~ /\p{Space}/ ?1:0'
>      1
>
>      $ perl -le'print "\xA0" =~ /\s/ ?1:0'
>      0
>
>      $ perl -le'print "\xA0" =~ /\s/u ?1:0'
>      1
>                                               __
>      $ perl -le'print "\xA0" =~ /\h/ ?1:0'      \
>      1                                           \
>                                                   > huh??
>      $ perl -le'print "\xA0" =~ /[\h]/ ?1:0'     /
>      0                                        __/
>
>      $ perl -le'print "\xA0" =~ /[\h]/u ?1:0'
>      1
>
> This is perl 5, version 16, subversion 0 (v5.16.0) built for
> x86_64-linux-thread-multi
>


Thread Previous


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