title: Is "\n" a vertical whitespace, i.e., should "\v" match it?
body: <p>Logically, it is (but logic is irrelevant whenever character encodings or locales are in play). According to</p>
  
  <pre><code>perl -e 'print "\n" =~ /\v/ ? "y\n" : "n\n";'
  </code></pre>
  
  <p>printing "y", it is. According to</p>
  
  <pre><code>Pattern.compile("\\v").matcher("\n").matches();
  </code></pre>
  
  <p>returning <code>false</code> in java, it's not. This wouldn't confuse me at all, if there weren't <a href="https://stackoverflow.com/questions/4304928/unicode-equivalents-for-w-and-b-in-java-regular-expressions/4307261#4307261">this posting</a> claiming that</p>
  
  <blockquote>
    <p>Sun’s updated Pattern class for JDK7 has a marvelous new flag, UNICODE_CHARACTER_CLASS, which makes everything work right again.</p>
  </blockquote>
  
  <p>But I'm using java version "1.7.0_07" and the flag exists and seems to change nothing at all. Moreover, "\n" 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.</p>