Logically, it is (but logic is irrelevant whenever character encodings or locales are in play). According to
perl -e 'print "
" =~ /v/ ? "y
" : "n
";'
printing "y", it is. According to
Pattern.compile("\v").matcher("
").matches();
returning false
in java, it's not. This wouldn't confuse me at all, if there weren't this posting claiming that
Sun’s updated Pattern class for JDK7 has a marvelous new flag, UNICODE_CHARACTER_CLASS, which makes everything work right again.
But I'm using java version "1.7.0_07" and the flag exists and seems to change nothing at all. Moreover, "
" is no newcomer to Unicode but a plain old ASCII character, so I really don't see how this difference may happen. Probably I'm doing something stupid, but I can't see it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…