if ($third_char ne 'c' || $third_char ne 'd'){ $part=substr($stri,0,2);