I surely hoped that this would be supported:
private static void regex() {
String plain = "\\w+";
String withTextBlocks = """
\w+
""";
}
but withTextBlocks does not compile under Java-17. Isn’t it the point of text blocks that we should not escape? I have been through the JEP and maybe the explanation is there, but I can't grok through it. And a second question in case someone knows, is there a future JEP for this? Thank you.
PS It works in Kotlin.