Why is `\.` not a valid escape sequence in java regex
<p>In the GWT tutorial where you build a <a href="http://www.gwtproject.org/doc/latest/tutorial/manageevents.html" rel="nofollow noreferrer">stock watcher</a> there is this regex expression to check if an input is valid:</p>

<pre><code>if (!symbol.matches("^[0-9A-Z\\.]{1,10}$"))
</code></pre>

<p>Which allows inputs <em>between 1 and 10 chars that are numbers, letters, or dots.</em></p>

<p>The part that confuses me is the <code>\\.</code></p>

<p>I interpret this as escaped backslash <code>\\</code> and then a <code>.</code> which stands for any character. And I thought the correct expression would be <code>\.</code> to escape the dot but doing this results in a regex error in eclipse <code>Invalid escape sequence</code>.</p>

<p>Am I missing the obvious here?</p>