Invoking matches and find

Report a typo

There is a string and two objects of the Matcher class:


String text = "Java supports regular expressions. LET'S USE JAVA!!!";

Pattern javaPattern = Pattern.compile("java", Pattern.CASE_INSENSITIVE);
Matcher javaMatcher = javaPattern.matcher(text);

Pattern regexPattern = Pattern.compile(".*regular expression.*");
Matcher regexMatcher = regexPattern.matcher(text);

Select all invocations that return true.
Select one or more options from the list
___

Create a free account to access the full topic