title: Java Regex does not match newline
body: <p>My code is as follows:</p>
  
  <pre><code>public class Test {
      static String REGEX = ".*([ |\t|\r\n|\r|\n]).*";
      static String st = "abcd\r\nefgh";
  
      public static void main(String args[]){
          System.out.println(st.matches(REGEX));
      }
  }
  </code></pre>
  
  <p>The code outputs <code>false</code>. In any other cases it matches as expected, but I can't figure out what the problem here is.</p>