summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-07 00:41:16 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-07 00:41:16 +0000
commitf586891147968a00cb7ac4921d1b2a415e9091bd (patch)
tree81cd9518c13a30d930f7df17e124fd94fbd3de9d
parent8692993118c7bb6d29743e2f564d11368140b2bf (diff)
downloadperl-f586891147968a00cb7ac4921d1b2a415e9091bd.tar.gz
More tweakage on the Unicode character class descriptions.
p4raw-id: //depot/perl@9062
-rwxr-xr-xlib/unicode/mktables.PL3
-rw-r--r--pod/perlretut.pod24
2 files changed, 14 insertions, 13 deletions
diff --git a/lib/unicode/mktables.PL b/lib/unicode/mktables.PL
index bb253055d2..dbc2ed1842 100755
--- a/lib/unicode/mktables.PL
+++ b/lib/unicode/mktables.PL
@@ -31,7 +31,8 @@ mkdir "To", 0755;
['IsSpacePerl',
'$cat =~ /^Z/ ||
$code =~ /^(0009|000A|000C|000D)$/', ''],
- ['IsBlank', '$cat =~ /^Z[^lp]$/ || $code eq "0009"', ''],
+ ['IsBlank', '$code =~ /^(0020|0009)$/ ||
+ $cat =~ /^Z[^lp]$/', ''],
['IsDigit', '$cat =~ /^Nd$/', ''],
['IsUpper', '$cat =~ /^L[ut]$/', ''],
['IsLower', '$cat =~ /^Ll$/', ''],
diff --git a/pod/perlretut.pod b/pod/perlretut.pod
index ad62873725..fa6479c0c4 100644
--- a/pod/perlretut.pod
+++ b/pod/perlretut.pod
@@ -1725,20 +1725,20 @@ traditional Unicode classes:
Perl class name Unicode class name or regular expression
- IsAlpha ^[LM]
- IsAlnum ^[LMN]
- IsASCII $code le 127
- IsCntrl ^C
- IsBlank ^Z[^lp] or $code eq "0009"
+ IsAlpha /^[LM]/
+ IsAlnum /^[LMN]/
+ IsASCII $code <= 127
+ IsCntrl /^C/
+ IsBlank $code =~ /^(0020|0009)$/ || /^Z[^lp]/
IsDigit Nd
- IsGraph ^([LMNPS]|Co)
+ IsGraph /^([LMNPS]|Co)/
IsLower Ll
- IsPrint ^([LMNPS]|Co|Zs)
- IsPunct ^P
- IsSpace ^Z or ($code =~ /^(0009|000A|000B|000C|000D)$/
- IsSpacePerl ^Z or ($code =~ /^(0009|000A|000C|000D)$/
- IsUpper ^L[ut]
- IsWord ^[LMN] or $code eq "005F"
+ IsPrint /^([LMNPS]|Co|Zs)/
+ IsPunct /^P/
+ IsSpace /^Z/ || ($code =~ /^(0009|000A|000B|000C|000D)$/
+ IsSpacePerl /^Z/ || ($code =~ /^(0009|000A|000C|000D)$/
+ IsUpper /^L[ut]/
+ IsWord /^[LMN]/ || $code eq "005F"
IsXDigit $code =~ /^00(3[0-9]|[46][1-6])$/
You can also use the official Unicode class names with the C<\p> and