File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2867,8 +2867,9 @@ has since been undefined.
2867
2867
S<<-- HERE> in m/%s/
2868
2868
2869
2869
(F) Group names must follow the rules for perl identifiers, meaning
2870
- they must start with a non-digit word character. A common cause of
2871
- this error is using (?&0) instead of (?0). See L<perlre>.
2870
+ that ASCII-range ones must start with a non-digit word character. A
2871
+ common cause of this error is using (?&0) instead of (?0). See
2872
+ L<perlre> and L<perldata/Identifier parsing>.
2872
2873
2873
2874
=item ()-group starts with a count
2874
2875
Original file line number Diff line number Diff line change @@ -1198,7 +1198,9 @@ You can dispense with numbers altogether and create named capture groups.
1198
1198
The notation is C<(?E<lt>I<name>E<gt>...)> to declare and C<\g{I<name>}> to
1199
1199
reference. (To be compatible with .Net regular expressions, C<\g{I<name>}> may
1200
1200
also be written as C<\k{I<name>}>, C<\kE<lt>I<name>E<gt>> or C<\k'I<name>'>.)
1201
- I<name> must not begin with a number, nor contain hyphens.
1201
+ I<name> must follow the rules for perl identifiers
1202
+ (L<perldata/Identifier parsing>) which means, for example, that they
1203
+ can't begin with a number, nor contain hyphens.
1202
1204
When different groups within the same pattern have the same name, any reference
1203
1205
to that name assumes the leftmost defined group. Named groups count in
1204
1206
absolute and relative numbering, and so can also be referred to by those
You can’t perform that action at this time.
0 commit comments