$output_line = "$3$2$1" if $input_line =~ /^([a-z][a-z\s]*[a-z])(\W+)(\d[\d-]*\d)$/i;