1.基于此代码https://docs.oracle.com/javase/tutorial/essential/regex/test_harness.html
谁能解释一下这是\"%s\"
什么
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;
}
我只知道那%s
是字符串。
2.引用元字符https://docs.oracle.com/javase/tutorial/essential/regex/literals.html对此输出有什么解释吗?