title: REGEXP to grab all text before second underscore, including second underscore
body: <p>So I have strings that come across like this:  </p>
  
  <pre><code>GRF_STHB_010_00  
  ABC_AB9_004_01
  BGH_NP2_002_03
  AG2_BVT_007_010
  </code></pre>
  
  <p>The text before the first underscore can be any combo of Letters or Numbers.  </p>
  
  <p>The text before the second underscore can also be any combo of letters or numbers.</p>
  
  <p>I want to be able to grab the whole string before the 2nd underscore, including the second underscore.</p>
  
  <p>I have come up with this for now:</p>
  
  <pre><code>^([^\d]*)
  </code></pre>
  
  <p>It works for the first one, and finds:</p>
  
  <pre><code>GRF_STHB_
  </code></pre>
  
  <p>But for the other two it stops at a number that it finds:</p>
  
  <pre><code>ABC_AB
  BGH_NP
  AG
  </code></pre>
  
  <p>I need this to work in REGEXP because this is being included in a spreadsheet for grabbing data.</p>
  
  <p>How can I adjust it so that it works with numbers and would have a result of:</p>
  
  <pre><code>GRF_STHB_
  ABC_AB9_
  BGH_NP2_
  AG2_BVT_
  </code></pre>
  
  <p>Here is a quick tester for anyone that can help:</p>
  
  <p><a href="http://regexpal.com/?flags=gm&amp;regex=%5E%28%5B%5E%5Cd%5D%2a%29&amp;input=GRF_STHB_010_00%20%20%0AABC_AB9_004_01%0ABGH_NP2_002_03%0AAG2_BVT_007_010" rel="nofollow">regexpal.com</a>
  Thanks!</p>