Jump to content

String matching: Difference between revisions

m
→‎{{header|Perl 6}}: multiple matches with 'indices'
m (→‎{{header|Tailspin}}: syntax update)
m (→‎{{header|Perl 6}}: multiple matches with 'indices')
Line 2,773:
Bonus task:
 
<lang perl6>$haystack.match($needle, :g)».from; # List of all positions where $needle appears in $haystack</lang>
$haystack.indices($needle :overlap); # Also find any overlapping instances of $needle in $haystack</lang>
 
=={{header|Phix}}==
2,392

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.