Regular expression to remove the dot (.) from a number : <p>I want to write a regular expression in Java to remove the dot (.) from a number and all the numbers that come after it.</p>

<p>Example: 3.14</p>

<p>Need a regex to return only 3.</p>

<p>I'm trying to use this block:</p>

<pre><code>String value = "3.14";
value = value.replaceAll("[[.]]", "");
System.out.println(value);
</code></pre>

<p>Obviously, it just removes the ".". I tried other matches like [[.*$]] to remove everything until the end of the line, but it is taking me nowhere. </p>

<p>I'm using this table (<a href="http://tutorials.jenkov.com/java-regex/syntax.html" rel="nofollow noreferrer">http://tutorials.jenkov.com/java-regex/syntax.html</a>), what I'm finding pretty good actually, and test its use.</p>
