$str = 'a004asdfsa'; #not starting with zero $str =~ s/^0+(?=\d)//; print $str; Output: -------- a004asdfsa