Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Typo in example fixed
With an order like "0-1-2" substitution makes no sense,
since it doesn't change the variable. According to the
comment line, the right order should probably be "1-2-0".
  • Loading branch information
Altai-man authored and AlexDaniel committed May 1, 2016
1 parent 5c517fe commit 41bbe3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/Language/regexes.pod
Expand Up @@ -772,7 +772,7 @@ way you can separate out the C<YYYY>, C<MM> and C<DD> parts of a date and
reformat them into C<MM-DD-YYYY> order:
$_ = '2016-01-23 18:09:00';
s/ (\d+)\-(\d+)\-(\d+) /$0-$1-$2/; # Transform YYYY-MM-DD to MM-DD-YYYY
s/ (\d+)\-(\d+)\-(\d+) /$1-$2-$0/; # Transform YYYY-MM-DD to MM-DD-YYYY
.say; # 01-23-2016 18:09:00
Since the right-hand side is effectively a regular Perl 6 interpolated string,
Expand Down

0 comments on commit 41bbe3b

Please sign in to comment.