title: What does '[^~]+' do?
body: <p>I am reviewing some code that was written before I got to my company and I see this <code>'[^~]+'</code> used in a lot of code. To add some context it is a part of a for loop function.</p>
  <pre><code>DECLARE
      new_parent_id number;
  BEGIN
  
  FOR i IN (
      select regexp_substr(:PAGE1_SELECTED, '[^~]+', 1, level) material_num, rownum
      from dual
      connect by regexp_substr(:PAGE1_SELECTED, '[^~]+', 1, level) is not NULL)
  LOOP
      if i.ROWNUM = 1 then
          new_parent_id := ASSIGN_NEW_MATERIAL (
              pMATERIAL_NUMBER =&gt; i.MATERIAL_NUMBER,
              pASSEMBLY_NAME =&gt; :PAGE1_NEW_ASSEMBLY
          );
      else
          ASSIGN_MATERIAL_TO_PARENT (
              pNEW_PARENT_ID =&gt; new_parent_id,
              pPART_NUMBER =&gt; i.PART_NUMBER
          );
      end if;
  END LOOP;
  
  END;
  
  </code></pre>