How to achieve this substring?
<p>There is a string having a dot form like this : <code>1.1.3</code></p>

<p>I want to get the <code>substring</code> of this string from the beginning untill the position of the last "." - 1 , that is <code>1.1</code> .</p>

<p>How to achieve that ?</p>
