Java: remove all characters after point
<p>I got a quick question,
I got the following code</p>

<pre><code>String chapterNumber = "14.2.1";
</code></pre>

<p>how can I achieve to get a String like the following out of my "chapterNumber"</p>

<pre><code>String mainChapterNumber = "14";
</code></pre>

<p><em>Edit:</em>
I want all the numbers in an int/String (doesn't matter to me) up to the first point</p>
