1.Based on this code https://docs.oracle.com/javase/tutorial/essential/regex/test_harness.html
Can anyone please explain what is this \"%s\"
in
while (matcher.find()) {
console.format("I found the text" + " \"%s\" starting at " +
"index %d and ending at index %d.%n",
matcher.group(),
matcher.start(),
matcher.end());
found = true;
}
I just know that %s
is for string.
2.Refering the meta-characters https://docs.oracle.com/javase/tutorial/essential/regex/literals.html is there any explanation for this outputs?