Some other variations:
use strict; use warnings; use 5.010; my $string = "_'nada_komo_el_'sol_"; $string =~ s/_'?(.)/_'$1/g; say $string; --output:-- _'nada_'komo_'el_'sol_
---
use strict; use warnings; use 5.010; my $string = "_'nada_komo_el_'sol_"; my @pieces = split /_'?/, $string; say join(q{_'}, @pieces); --output:-- _'nada_'komo_'el_'sol
In reply to Re: Modifying the match position after each match
by 7stud
in thread Modifying the match position after each match
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |