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

\h not equiv to [\h]

Thread Next
From:
Eric Brine
Date:
July 20, 2012 08:44
Subject:
\h not equiv to [\h]
Message ID:
CALJW-qEUgBr4B3f7M2Orh9F177TuLs7LOdNSwErLF=iggBu1xQ@mail.gmail.com
Hi,

Is this a known bug?

    $ 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 Next


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