File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1111,6 +1111,12 @@ case it defaults to C<$/.to>.
1111
1111
say ~m:c(2)/a./; # a2
1112
1112
}
1113
1113
1114
+ I < Note: > unlike C < :pos > , a match with :continue() will attempt, to
1115
+ match further in the string, instead of failing:
1116
+
1117
+ say "abcdefg" ~~ m:c(3)/e.+/; # OUTPUT « 「efg」 »
1118
+ say "abcdefg" ~~ m:p(3)/e.+/; # OUTPUT « False »
1119
+
1114
1120
= head3 Exhaustive
1115
1121
1116
1122
To find all possible matches of a regex – including overlapping ones – and
@@ -1165,6 +1171,12 @@ Anchor the match at a specific position in the string:
1165
1171
1166
1172
C < :p > is shorthand for C < :pos > .
1167
1173
1174
+ I < Note: > unlike C < :continue > , a match anchored with :pos() will fail,
1175
+ instead of attempting to match further down the string:
1176
+
1177
+ say "abcdefg" ~~ m:c(3)/e.+/; # OUTPUT « 「efg」 »
1178
+ say "abcdefg" ~~ m:p(3)/e.+/; # OUTPUT « False »
1179
+
1168
1180
= head3 Overlap
1169
1181
1170
1182
To get several matches, including overlapping matches, but only one (the
You can’t perform that action at this time.
0 commit comments