I couldn’t find this in the documentation. I need to enable case insensitivity, but only in special cases.
How do I call the method Pattern.compile(String regex, int flags) in such a way that it is equivalent to Pattern.compile(String regex)? Can I just use Pattern.compile("my regex", 0)?
Yes –
Pattern.compile(foo)ends up just returningPattern.compile(foo, 0).It would be nice if the documentation actually said that, but that’s what the implementation I just looked at does…