Pattern p2 = Pattern.compile(\".*\"); Matcher m2 = p2.matcher(\"true\"); System.out.println(m2.matches() + \" [\" + m2.group() + \"]\");
When I use
[] is the character class and most inside it stand for their actual symbol. Dot in this case would just be a dot and not a dot with special meaning in regex.
[]