 <p>Using <code>split()</code> without parameters will result in splitting after a space example <code>"test1 test2".split()</code> results in <code>["test1", "test2"]</code></p> <p>instead, try this:</p> <pre><code>newLine = line.split("|") </code></pre>