I’ve been building this regular expression for a while and so far I’ve had not much luck. Anyways the regular expression is supposed to catch the following characters:
{}[]+-*/,.();
The boolean expression below works fine except when it encounters a ‘)’
atom.matches("\\[\\+\\-\\*/,.\\(\\)\\}\\{\\};");
Thanks for any help in advance
You should use a character class:
More info: http://www.regular-expressions.info/charclass.html