in reply to Replacing string with its length in Regex
my $s = s/_*(X+)_*/length($1) . ','/ge;
$s =~ s/,$//;
$r =~ s/(^_+|_+$)//g;
$r =~ s/_+/,/g;
$r =~ s/(X+)/length$1/ge;
15 years from now, by which time it will be a completely different language
It's just a number, so who cares?
Results (109 votes). Check out past polls.