title: Replacing first occurence of character in a string using HiveQL
body: <p>I am trying to replace the first occurrence of <code>'-'</code> in a string in Hive table. I am using HiveQL. I searched this topic here and other websites, but could not find clear explanation how to use metacharacters with <code>regexp_replace()</code> to do that. </p>
  
  <p>This is a string from which I need to replace first '-' with empty space: <code>16-001-02707</code> 
  The result should be like this: <code>16001-02707</code>
  This is the method I used: </p>
  
  <pre><code>select regexp_replace ('16-001-02707','[^[:digit:]]', '');
  </code></pre>
  
  <p>However, this doesn't do anything. </p>