title: Remove all dots from a String except first, with Oracle REGEXP_REPLACE
body: <p>I want to use the Oracle REGEXP_REPLACE to remove some dots from a String.
  I have to remove from the second dot if exists.
  For example:</p>
  
  <pre><code>4       =&gt; 4
  5       =&gt; 5
  5.1     =&gt; 5.1
  5.1.1   =&gt; 5.11
  5.1.2   =&gt; 5.12
  5.1.2.1 =&gt; 5.121
  5.1.2.2 =&gt; 5.122
  6       =&gt; 6
  </code></pre>
  
  <p>I have this</p>
  
  <pre><code>select REGEXP_REPLACE(num, '(\d+)(\.)(\d+)(\.)(\d+)', '\1.\3\5')
  from my_table;
  </code></pre>
  
  <p>the problem is that my query is made just for two dots. If the string has more than two dots, I have to modify the query to accept more dots and so.
  Is there any way to do this automatically?</p>
  
  <p>Thanks</p>