title: Using regex for parse n - arguments in System input
body: <p>I have to parse System input text using space(<code>\s</code>) and line (<code>\n</code>) as delimiters for logic.</p>
  
  <p>Is it possible to improve code with a match for 1 to n-arguments? </p>
  
  <p>Because I don't know in the beginning how much arguments will be.
  <code>t</code> - parameter is a number of test cases.</p>
  
  <p>Arguments could be <em>numbers, string or char symbols</em>.</p>
  
  <p>For every test, there is limited time run - I have to use <em>the fastest algorithm</em> as possible to parse text.</p>
  
  <pre><code>3  //3 test cases
  0 2
  1 3 1
  2 0 1 5
  1  //1 test
  0
  2  //2 test
  1 1 1 1
  4 3 2 5 aaa 5 a 5 h 5 5 c 5 5 h 5 5 5 j 5 5 55 0 5 5 k 5 555 5
  </code></pre>
  
  <p>Here is an example with 2 <code>int</code> arguments:</p>
  
  <pre><code>import java.io.*;
  import java.io.PrintStream;
  import java.util.*;
  
  
  public class Solution {
  
        public static void main(String[] args) {
          Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
          int t = in.nextInt(); // Scanner has functions to read ints.
          for (int i = 1; i &lt;= t; ++i) {
            int n = in.nextInt();
            int m = in.nextInt();
             System.out.println("Line #"+t+": "+n+ ", " + m); //calculate arguments by some logic
  
          }
        }
  }
  </code></pre>