Pattern p2 = Pattern.compile(\".*\"); Matcher m2 = p2.matcher(\"true\"); System.out.println(m2.matches() + \" [\" + m2.group() + \"]\");
When I use
The dot . is a predefined character class. It matches any character (may or may not match line terminators). If want to define character class that includes a range of values, you can use [].
.
[]