有谁知道为什么正则表达式与Java 16\p{Cs}
中的符号不匹配?它曾经在 Java 11 中与之匹配。
爪哇 11
jshell
| Welcome to JShell -- Version 11.0.7
| For an introduction type: /help intro
jshell> import java.util.regex.*
jshell> var text = new StringBuilder().appendCodePoint(55622).appendCodePoint(56380)
text ==>
jshell> Pattern.compile("\\p{Cs}").matcher(text).find()
$3 ==> true
爪哇 16
INFO: Created user preferences directory.
| Welcome to JShell -- Version 16.0.1
| For an introduction type: /help intro
jshell> import java.util.regex.*
jshell> var text = new StringBuilder().appendCodePoint(55622).appendCodePoint(56380)
text ==>
jshell> Pattern.compile("\\p{Cs}").matcher(text).find()
$3 ==> false