title: how to get string value between underscores in oracle
body: <p>I have string called <code>"RAM_ESH_BABU_SAR"</code>.</p>
  
  <p>My requirement is to get the value from first character to second underscore i.e <code>RAM_ESH</code> and and also get the value after last underscore of from a input string i.e <code>SAR</code>.</p>
  
  <p>Please suggest me query. Below code i have tried.</p>
  
  <pre><code>SELECT
      REGEXP_SUBSTR( 'RAM_ESH_BABU_SAR', '[^_]+', 1, 2 )
  FROM
      dual
  </code></pre>