title: How to use a replace string with reflect in HIVE?
body: <p>I want to replace a string from "\7" to "\1", my input file like this:</p>
  
  <pre><code>a\7b\7c\7
  </code></pre>
  
  <p>my other table FIELDS TERMINATED BY '\001', so I must replace "\7" to "\1".</p>
  
  <p>I tried </p>
  
  <pre><code>select regexp_replace(value, "\\u0007", "\\u0001") from test_tbl where dbs="test" and dt=20131130;
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>And I wrote a php script like this:</p>
  
  <pre><code>&lt;?php
  $strCmd = "hive -e 'select regexp_replace(value, \"\\u0007\", \"\1\") from test_tbl where dbs=\"test\" and dt=20131130;' &gt; tmp";
  exec($strCmd);
  </code></pre>
  
  <p>but it return some error.                                                                                                             </p>