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.
只是一个简单的问题......如果我使用以下表达式,我试图弄清楚我是否可以免受 PatternSyntaxException 的影响:
Pattern.compile(Pattern.quote(someNotNullStringHere), Pattern.CASE_INSENSITIVE);
任何帮助将不胜感激。
是的,这是安全的。PatternSyntaxException如果引用整个输入值,则不会抛出A。
PatternSyntaxException