Skip to content

Commit 6e3a139

Browse files
authored
Mentions captures start with $0
1 parent b2904a1 commit 6e3a139

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/Language/5to6-nutshell.pod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,11 @@ Alternately, the new C<.match> and C<.subst> methods can be used. Note that
901901
C<.subst> is non-mutating. See
902902
L<S05/Substitution|https://design.perl6.org/S05.html#Substitution>.
903903
904+
=head2 Captures start with 0, not 1
905+
906+
/(.+)/ and print $1; # Perl 5
907+
/(.+)/ and print $0; # Perl 5
908+
904909
=head2 Move modifiers
905910
906911
Move any modifiers from the end of the regex to the beginning. This may

0 commit comments

Comments
 (0)