SB0 SB00 #### our $sbNumHost1=''; while ($sbNumHost1 eq "") { print "Enter the SB## \t: "; chomp($sbNumHost1 = ReadLine(0)); if ($sbNumHost1 !~ m/(SB)(\d{1,2})/i) { print "matched >>>>>>>$&<<<<<<<\n"; $sbNumHost1 = ''; } } print "done\n";