Reputation: 33
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
Upvotes: 1
Views: 141
Reputation: 39689
You should use a character class:
[{}[\]+*/,.()-]
More info: http://www.regular-expressions.info/charclass.html
Upvotes: 2