awk question

Hello Guru's,

I have a report that prints lines with either 8 columns wide.
The last column #8 for the most part have a three character value.
My requirement is to print the whole record where the last columns value is exactly 3 characters wide and if it does not equal "AAA" or "BBB" or "CCC"

So far this is what I have

awk '{if (length($8) < 4) print $0}' 20061106_auditlog

gets me all records that have exactly 3 character wide value for column 8.
question is how do I filter within awk for certain types of values that are not "AAA" or "BBB" or "CCC".

Thanks for the help
Jerardfjay

Here is what I have so far and it seems to work. I am sure there is a more elegant solution that someone can think of I could use the same.

awk '{if (length($8) < 4 && $8 != "AAA" && $8 != "BBB" && $8 != "CCC") print $0 }' 20061106_auditlog

Thanks
Jerardfjay

Try...

awk 'length($8)==3 && $8 !~ /^(AAA|BBB|CCC)$/' 20061106_auditlog