in reply to Re^3: regular expressionin thread regular expression
Slight variation so you don't need the length:
substr($str, 6, -4) =~ s/./X/g; [download]