diff options
-rw-r--r-- | lib/unicore/mktables | 7 | ||||
-rw-r--r-- | pod/perldelta.pod | 4 | ||||
-rw-r--r-- | t/re/re_tests | 5 |
3 files changed, 15 insertions, 1 deletions
diff --git a/lib/unicore/mktables b/lib/unicore/mktables index 776741eeba..4c8059775c 100644 --- a/lib/unicore/mktables +++ b/lib/unicore/mktables @@ -13159,6 +13159,13 @@ sub compile_perl() { else { $Word += ord('_'); # Make sure this is a $Word } + my $JC = property_ref('Join_Control'); # Wasn't in release 1 + if (defined $JC) { + $Word += $JC->table('Y'); + } + else { + $Word += 0x200C + 0x200D; + } # This is a Perl extension, so the name doesn't begin with Posix. my $PerlWord = $perl->add_match_table('PerlWord', diff --git a/pod/perldelta.pod b/pod/perldelta.pod index a8877f9e92..27ab2862cf 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -327,7 +327,9 @@ L</Modules and Pragmata>. =item * -XXX +C<\w> now matches the code points U+200C (ZERO WIDTH NON-JOINER) and +U+200D (ZERO WIDTH JOINER). C<\W> no longer matches these. This change +is because Unicode corrected their definition of what C<\w> should match. =back diff --git a/t/re/re_tests b/t/re/re_tests index 3d281555c9..9fa374e700 100644 --- a/t/re/re_tests +++ b/t/re/re_tests @@ -1696,4 +1696,9 @@ ab[c\\\](??{"x"})]{3}d ab\\](d y - - (?a:\p{Any}) \x{100} y $& \x{100} (?aa:\p{Any}) \x{100} y $& \x{100} +\w \x{200C} y $& \x{200C} +\W \x{200C} n - - +\w \x{200D} y $& \x{200D} +\W \x{200D} n - - + # vim: softtabstop=0 noexpandtab |