title: how to find substring of string in jQuery?
body: <p>I can you please tell me how to split string to get out put.</p>
  
  <ul>
  <li>If I have this string: <code>'tc_1'</code> Output is : first String : <code>'tc_'</code>  second string: <code>'1'</code></li>
  <li>If I have this string: <code>'tc_1_tc_1'</code> Output is : first String : <code>'tc_1_tc_'</code>  second string: <code>'1'</code></li>
  <li>If I have this string: <code>'tc_1_tc_1_tc_2'</code> Output is : first String : <code>'tc_1_tc_1_'</code>  second string: <code>'2'</code></li>
  </ul>
  
  <p>in jQuery ?</p>
  
  <p>I use this </p>
  
  <pre><code>var index = id.indexOf("_");
  var count = id.substring(index + 1, id.length)
  </code></pre>
  
  <p>It works for the first case but does not work in other cases.</p>