summaryrefslogtreecommitdiff
path: root/pod/perlre.pod
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-02-05 13:32:26 -0700
committerKarl Williamson <khw@cpan.org>2020-02-12 16:25:53 -0700
commit673c254b34746289019db8836016c81eb38e5bf0 (patch)
treea137acc65278cc7a8f7c3c03024c21e10940c0b6 /pod/perlre.pod
parentff5ebe043d728d8813248fe7b3a58935b1116e6a (diff)
downloadperl-673c254b34746289019db8836016c81eb38e5bf0.tar.gz
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.
Diffstat (limited to 'pod/perlre.pod')
-rw-r--r--pod/perlre.pod2
1 files changed, 1 insertions, 1 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod
index 68e18c950d..8c0d2049e0 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -465,7 +465,7 @@ Use of C</x> means that if you want real
whitespace or C<"#"> characters in the pattern (outside a bracketed character
class, which is unaffected by C</x>), then you'll either have to
escape them (using backslashes or C<\Q...\E>) or encode them using octal,
-hex, or C<\N{}> escapes.
+hex, or C<\N{}> or C<\p{name=...}> escapes.
It is ineffective to try to continue a comment onto the next line by
escaping the C<\n> with a backslash or C<\Q>.