RosettaCodeData/Task/String-matching/Perl-6/string-matching-4.pl6

2 lines
97 B
Raku

$haystack.match($needle, :g)».from; # List of all positions where $needle appears in $haystack