title: Java RegEx that matches anything BUT literal string 'NIL' or 'nil'
body: <p>OK, guys. Here's a Java interview-type question that seems to have stumped some very smart people around here. They actually need this for production code, so it's more than just an interview puzzler.</p>
  
  <p>They need a regular expression, in Java, that returns true if a string literal is <em>anything</em> other than the 3-letter word NIL. The test needs to be case insensitive, and the RegEx itself must do all the work.</p>
  
  <p>So, the RegEx should reject <strong>NIL, nil, NiL, nIL,</strong> and so on.</p>
  
  <p>It should, however, accept: nile, anil, will, zappa-nil-a, and the empty string.</p>
  
  <p><em>How many Java developers does it take to write a trivial RegEx? Apparently a lot!</em></p>