$str = '0a4sdfsa'; #no number followed by zero $str =~ s/^0+(?=\d)// ; print $str; Output: -------- 0a4sdfsa