$Disc = get_word(); $D1 = substr($Disc,0,7); $D2 = substr($Disc,7,1); if ($D1 !~ /0+/ and $D2 !~ /([0-9]+)/) ##Catches FFFFFFFF just fine, but not 6C163512 #### $D1 = 6C16351 and $D2 = 2 ###Get words until corruption is cleared. Works great with FFFFFFFF, but will not catch 6C163512 if ($D1 !~ /0000000/ and $D2 !~ /\D/) ## Same as above ###Get words until corruption is cleared. Works great with FFFFFFFF, but will not catch 6C163512 if ($Disc =~ /[1-9a-ZA-Z]{7}\D/ ## Same as above ###Get words until corruption is cleared. Works great with FFFFFFFF, but will not catch 6C163512