In Regexes§
See primary documentation in context for Continue
The :continue
or short :c
adverb takes an argument. The argument is the position where the regex should start to search. By default, it searches from the start of the string, but :c
overrides that. If no position is specified for :c
, it will default to 0
unless $/
is set, in which case, it defaults to $/.to
.
given 'a1xa2'
Note: unlike :pos
, a match with :continue() will attempt to match further in the string, instead of failing:
say "abcdefg" ~~ m:c(3)/e.+/; # OUTPUT: «「efg」»say "abcdefg" ~~ m:p(3)/e.+/; # OUTPUT: «False»