mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
perldiag: Update description for regex group names
This was written before Unicode, and its wording does not accurately extend beyond ASCII. This commit clarifies the description.
This commit is contained in:
parent
54a6582cfa
commit
291e398846
@ -2881,9 +2881,19 @@ has since been undefined.
|
||||
=item Group name must start with a non-digit word character in regex; marked by
|
||||
S<<-- HERE> in m/%s/
|
||||
|
||||
(F) Group names must follow the rules for perl identifiers, meaning
|
||||
they must start with a non-digit word character. A common cause of
|
||||
this error is using (?&0) instead of (?0). See L<perlre>.
|
||||
(F) Group names must follow the rules for Perl identifiers, meaning
|
||||
they must start with a character that matches C<\p{XID_Start}> plus the
|
||||
underscore. This means the first character may not be a digit.
|
||||
Subsequent characters must match C<\p{XID_Continue}>.
|
||||
|
||||
A common cause of this error is using (?&0) instead of (?0).
|
||||
|
||||
This message was formulated before Perl supported Unicode; so it is
|
||||
not accurate for Unicode characters outside the ASCII-range. There are
|
||||
many word characters in Unicode that may not start a group name, and a
|
||||
few that may not be a continuation character.
|
||||
|
||||
See L<perlre>.
|
||||
|
||||
=item ()-group starts with a count
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user