Using a Perl or unix regex, how would I capture a word that is not a range of values. This is what I am trying to achieve.
(\w:not('int','long'))
Not sure if this is valid perl syntax, but in a "general" taste you might say
/\b(?!int\b|long\b)\w+\b/
If you want to spell a word, put parens around \w+ like this
\w+
/\b(?!int\b|long\b)(\w+)\b/
It is generally faster to say:
my %exclude = map { $_ => 1 } qw/int long/; my @words = grep { not exists $exclude{$_} } /(?:\b|^) (\w+) (?:\b|$)/gx;
especially in versions of Perl prior to 5.10 (when interleaving received a significant speed increase).