This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add qr/\p{Name=...}/
authorKarl Williamson <khw@cpan.org>
Wed, 5 Feb 2020 20:32:26 +0000 (13:32 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 12 Feb 2020 23:25:53 +0000 (16:25 -0700)
commit673c254b34746289019db8836016c81eb38e5bf0
treea137acc65278cc7a8f7c3c03024c21e10940c0b6
parentff5ebe043d728d8813248fe7b3a58935b1116e6a
Add qr/\p{Name=...}/

This accomplishes the same thing as \N{...}, but only for regex
patterns, using loose matching and only the official Unicode names.

This commit includes a comparison of the two approaches, added to
perlunicode.  But the real reason to do this is as a way station to
being able to specify wild card lookup on the name property, coming in a
later commit.

I chose to not include user-defined aliases nor :short character names
at this time.  I thought that there might be unforeseen consequences of
using them.  It's better to later relax a requirement than to try to
restrict it.
16 files changed:
charclass_invlists.h
lib/_charnames.pm
lib/charnames.pm
lib/charnames.t
lib/unicore/mktables
lib/unicore/uni_keywords.pl
pod/perldelta.pod
pod/perlre.pod
pod/perlretut.pod
pod/perlunicode.pod
pod/perlunicook.pod
pod/perluniintro.pod
regcharclass.h
regcomp.c
t/re/pat_advanced.t
uni_keywords.h