Output: _'na'da_'komo_'el_'sol_ Why even bother capturing the single quotes in the string that are were you want them when you're going to insert them anyway?#! /usr/bin/perl -w use strict; use locale; my $string = "_'na'da_komo_el_'sol_"; $string =~ s/(_)'?(\w)/$1'$2/g; print "$string\n";
In reply to Re: Modifying the match position after each match
by jacaril
in thread Modifying the match position after each match
by pat_mc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |