title: Split and Scanner with multiple delimiters
body: <p>I am attempting to create a Scanner with a delimiter that will parse through lines from a text file and then create arrays using this information and the split() method. However, I am unable to successfully stop the split() method from applying splitting the next line of the text file.</p>
  <pre><code>public class Main {
  
  public static void main(String[] args) throws FileNotFoundException {
  fileReader(&quot;test.txt&quot;);
  }
  
  public static void fileReader(String filename) throws FileNotFoundException {
      Scanner in = new Scanner(new File(filename));
      in.useDelimiter(&quot;,&quot;);
      String[] test = in.next().split(&quot;:&quot;);
      String[] test2 = in.next().split(&quot;:&quot;);
      System.out.println(Arrays.toString(test));
      System.out.println(&quot;\n&quot; + Arrays.toString(test2));
  }
  </code></pre>
  <p>}</p>
  <p>test.txt</p>
  <pre><code>A:B:C,ONE:TWO:THREE
  ALPHA:BETA:CHARLIE,FOUR:FIVE:SIX
  </code></pre>
  <p>Output:</p>
  <pre><code>[A, B, C]
  
  [ONE, TWO, THREE
  ALPHA, BETA, CHARLIE, FOUR, FIVE, SIX]
  </code></pre>
  <p>Expected Output:</p>
  <pre><code>[A, B, C] [ONE, TWO, THREE]
  </code></pre>
  <p>Note, I will eventually add a loop to parse through entire text file, creating Arrays using the other lines.</p>