title: Not regexp_like, find null values
body: <p>Doing data checking of input data in staging tables prior to loading into the main system tables.  Because I want to use the same field checking in Apex I have implemented the checks as regular expressions using 'not regexp_like' to return any field that does not match its pattern.  However, for a mandatory 10 character field I expected a pattern such as:</p>
  
  <p>'^.{1,10}$'</p>
  
  <p>to return any field that was null with the fields that were too long, it does not, null fields are not returned.</p>
  
  <p>Is there a regexp pattern that will do this?</p>
  
  <p>Example:</p>
  
  <pre><code>    select col
                  from (select null col from dual
                              union all
                              select 'A string' from dual)
              where not regexp_like(col, '^.{1,10}$')
  </code></pre>
  
  <p>Removing the 'not' returns 1 row as expected...</p>
  
  <p>The point here is to force the pattern to find the null, not to use regexp_like to find the good values and then exclude them, or to use an NVL on the field.  This checking is already expensive enough!</p>
  
  <p>I am assuming, that like most Oracle code involving null what is happening here is that regexp_like sees null and therefore returns null?</p>
  
  <p>Does Java script and Java behave in the same way? </p>
  
  <p>Thanks</p>
  
  <p>Bob</p>