$str=~m/^(.?).*(.?)$/ [download]
In reply to Re^2: regex for string by saranperl in thread regex for string by saranperl