title: Using multiple delimiters with scanner - Java
body: <p>I'm trying to use both tabs and newlines as delimiters to read from a .txt file. What I have at the moment is:</p>
  
  <pre><code>Scanner fileScanner = new Scanner(new FileReader("propertys.txt"));
  
  fileScanner.useDelimiter("[\\t\\n]");
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre><code>fileScanner.useDelimiter("\\t|\\n");
  </code></pre>
  
  <p>and</p>
  
  <pre><code>fileScanner.useDelimiter("[\\t|\\n]");
  </code></pre>
  
  <p>I've got no idea what's going wrong, I've searched around a lot and it looks like one of those should be working. Clearly I'm doing something wrong.</p>