in reply to Re: Replacing string with its length in Regexin thread Replacing string with its length in Regex
$r =~ s/(^_+|_+$)//g; $r =~ s/_+/,/g; $r =~ s/(X+)/length$1/ge; [download]