i have a clarification answer with a simple case sensitivity question with the code below
import java.util.regex.Pattern; public class NewClass6 { public static void main(String[] args) { Pattern patt = Pattern.compile("[aeiou]", Pattern.CASE_INSENSITIVE); String temp = "A"; if (temp.matches(patt.pattern())) { System.out.println("MATCH!"); } } }
given that i already using Pattern class doing a bussiness with the Matcher(Pattern-matching),
in this case the String object(temp) that refers to a string value doesnt matches the pattern even if it has been compiled in a
CASE_INSENSITIVE manner..
is it because the statement patt.pattern() ONLY RETURNS a pattern, but the case sensitivity manner doesnt/cannot do anything?