selecting second string point using js substing
<p>i want to select a sting from the long para. it has number of dot('.')s. i want to trim the word from the second one, is it any way to do this?</p>

<p>example</p>

<pre><code>var name = "one.two.three";
name.substring(0,name.indexOf('.'))
name.substring(0,name.lastIndexOf('.'))
</code></pre>

<p>from above trimming in case if i use indexOf it gives first word (one), if i use lastIndex of it gives the word (three), but i need to select the second one, to get value as 'second'</p>

<p>how can i trim this using indexOf method? or to select multicombination strings like one.three or one.two, or two.three?</p>

<p>thanks in advance!</p>
