if ($inst !~ /lea/i) { # do things } #### if ("$label$inst" !~ /\blea\b/i) { # do things }