Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经构建这个正则表达式有一段时间了,到目前为止我运气不佳。无论如何,正则表达式应该捕获以下字符: {}[]+-*/,.();
下面的布尔表达式可以正常工作,除非遇到')'
atom.matches("\\[\\+\\-\\*/,.\\(\\)\\}\\{\\};");
感谢您提前提供任何帮助
你应该使用一个字符类:
[{}[\]+*/,.()-]
更多信息:http ://www.regular-expressions.info/charclass.html