develooper Front page | perl.perl5.porters | Postings from April 2008

Re: [PATCH] RE: [perl #49302] [[:print:]] v \p{Print}

Thread Previous
From:
David Landgren
Date:
April 7, 2008 13:48
Subject:
Re: [PATCH] RE: [perl #49302] [[:print:]] v \p{Print}
Message ID:
47FA88DA.2080202@landgren.net
Robin Barker wrote:
> No progress in resolving this in code, so here is documentation patch.
> 
> Robin
> 
> --- pod/perlre.pod.orig	2008-01-30 20:41:06.000000000 +0000
> +++ pod/perlre.pod
> @@ -375,8 +375,8 @@
>      digit       IsDigit        \d
>      graph       IsGraph
>      lower       IsLower
> -    print       IsPrint
> -    punct       IsPunct
> +    print       IsPrint		(but see 2. below)
> +    punct       IsPunct		(but see 3. below)
>      space       IsSpace
>                  IsSpacePerl    \s
>      upper       IsUpper
> @@ -385,6 +385,41 @@
>  
>  For example C<[[:lower:]]> and C<\p{IsLower}> are equivalent.
>  
> +However, the equivalence between C<[[:xxxxx:]]> and C<\p{Xxxxx}> is not exact.
> +
> +=over 4
> +
> +=item 1.
> +
> +C<[[:xxxxx:]]> only matches characters in the range 0x00-0x7F.
> +
> +=item 2.
> +
> +C<\p{IsPrint}> matches characters 0x09-0x0d but C<[[:print:]]> does not.
> +
> +=item 3.
> +
> +C<[[:punct::]]> matches the following but C<\p{IsPunct}> does not,
> +because they are classed as symbols in Unicode.

s/classed/classified/

considered?

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