In the GWT tutorial where you build a stock watcher there is this regex expression to check if an input is valid:
if (!symbol.matches("^[0-9A-Z\\.]{1,10}$"))
Which allows inputs between 1 and 10 chars that are numbers, letters, or dots.
The part that confuses me is the \\.
I interpret this as escaped backslash \\ and then a . which stands for any character. And I thought the correct expression would be \. to escape the dot but doing this results in a regex error in eclipse Invalid escape sequence.
Am I missing the obvious here?