use strict; use locale; my $string = "_'nada_komo_el_'sol_"; $string =~ s/(_)([^'])/$1'$2/g; print $string; __END__ _'nada_'komo_'el_'sol_
Update: or even:
$string =~ s/(_)[^']/$1'/g;
In reply to Re: Modifying the match position after each match
by toolic
in thread Modifying the match position after each match
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |