How does Awk interpret $0!~

I know $0 is the entire file's contents (at least I think that is what it is!), but what exactly is: $0!~

This was a snippet from a larger line

awk '$0!~/^$/ {print $0}'

This deletes blank lines, but I want to know specifically the $0!~ part... I am guessing /^$/ is regex for blank line... and {print $0} means to print the whole thing to stdout.. Right?

Yes.
~ == >> "match"
!~ == >> "no match"
It prints lines which doesn't match with regular exp ^$ i.e. blank.
So prints all non-blank lines only (i.e. delete blank lines)

$0 is one record (line) from the file. $1 is field #1, $2 is field #2..... depending on your field separator.

How do you search for a regex in awk that is case insensitive?

awk '$0~ /case-insensitive-regex-here/'

Nevermind, I guess I got it, is this the best way?

 awk 'tolower ($0)~ /case-insensitive-regex-here/' 

Using next instruction:

BEGIN { IGNORECASE = 1; }

Regards,
Birei

Works only with gawk.