Cursus Raku / Expressiones regulares et grammaticae / Expressiones regulares / Substitutio et permutatio / Operator substitutionis
Quiz — Operator s///
Quid haec programma imprimit?
my $s = 'one two two';
$s ~~ s/two/three/;
say $s;| 1 | one three two |
| 0 | one three three |
| 0 | one two two |
| 0 | three two two |
Sine adverbio :g s/// solam
primam congruentiam permutat. Itaque solum primum
two three fit, dans
one three two. Cum s:g/// utraque occurrentia
mutaretur.