title: regex to find "null" values from a column
body: <p>I have a column <code>JSON_DATA</code>. The values within this column have an object type. It contains a json. This query works fine:</p>
  <pre><code>SELECT
      $1 AS &quot;JSON_DATA&quot;
   FROM TEST_TABLE 
  </code></pre>
  <p>This is how the data might look like:</p>
  <pre><code>{
    &quot;Type&quot;: &quot;xxi&quot;,
    &quot;Quantity&quot;: &quot;null&quot;,
    &quot;ContactPerson&quot;: &quot;null&quot;,
    &quot;Email&quot;: null
  }
  </code></pre>
  <p>Some of the values within this field are &quot;null&quot;. I want to search all occurrences of quoted &quot;nulls&quot; and replace/regex_replace them with proper NULL values.</p>
  <p>Desired output result:</p>
  <pre><code>{
    &quot;Type&quot;: &quot;xxi&quot;,
    &quot;Quantity&quot;: NULL,
    &quot;ContactPerson&quot;: NULL,
    &quot;Email&quot;: null
  }
  </code></pre>
  <p>I tried this:</p>
  <pre><code>SELECT
      REGEXP_REPLACE( $1 , &quot;null&quot;,  NULL) AS &quot;JSON_DATA&quot;
   FROM TEST_TABLE 
  </code></pre>
  <p>but I get an error that:</p>
  <pre><code>SQL Error [904] [42000]: SQL compilation error: error line 2 at position 22
  invalid identifier '&quot;null&quot;'
  </code></pre>
  <p>I believe its because &quot;null&quot;, from the second parameter, isn't the correct regex for the task. How can I fix this?</p>
  <p>Edit:</p>
  <p>I also tried this:</p>
  <pre><code>SELECT
      REGEXP_REPLACE( $1 , '&quot;null&quot;',  NULL) AS &quot;JSON_DATA&quot;
   FROM TEST_TABLE 
  </code></pre>
  <p>but instead of finding and replacing all &quot;null&quot;s within the json objects of each row, the end result is just NULL for all rows.</p>