Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Explicilty mention ^ and $ anchor to string and not line. mspo++
  • Loading branch information
zoffixznet committed Jan 11, 2016
1 parent 7cb83fb commit 5b939ec
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/Language/regexes.pod
Expand Up @@ -442,6 +442,18 @@ You can, of course, combine both anchors:
say so 'use perl' ~~ /^ perl $/; # False
say so 'perl' ~~ /^ perl $/; # True
Keep in mind, these anchors match end of B<string>, not line:
my $str = q:to/EOS/;
Keep it secret
and keep it safe
EOS
say so $s ~~ /safe $/; # True
say so $s ~~ /secret $/; # False
say so $s ~~ /^Keep /; # True
say so $s ~~ /^and /; # False
=head2 X«C<^^>, Start of Line and C<$$>, End of Line|regex,^^;regex,$$»
The C<^^> assertion matches at the start of a logical line. That is, either
Expand Down

0 comments on commit 5b939ec

Please sign in to comment.