title: PatternSyntaxException: Unexpected internal error near index 1 for `.split(File.separator)` under windows
body: <p>The following snippet works fine under linux but gives me error under windows (which is very weird since jvm/jdk is supposed to be OS-agnostic). </p>
  
  <pre><code>  File f = ... 
    String[] split = f.getPath().split(File.separator);
  </code></pre>
  
  <p>Here is the error: </p>
  
  <pre><code>java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
  \
   ^
          at java.util.regex.Pattern.error(Unknown Source)
          at java.util.regex.Pattern.compile(Unknown Source)
          at java.util.regex.Pattern.&lt;init&gt;(Unknown Source)
          at java.util.regex.Pattern.compile(Unknown Source)
          at java.lang.String.split(Unknown Source)
          at java.lang.String.split(Unknown Source)
  </code></pre>
  
  <p>any idea what is wrong? </p>