Call regexp only once when chacking for display key.