>perl -wMstrict -le "my $s = 'xyzINC1234567'; ;; print 'negative assertion true' if $s =~ /INC\d{7}(?!\d)/; print 'positive assertion true' if $s =~ /INC\d{7}(?=\D)/; " negative assertion true