Regex for splitting up strings (Java)
<p>I have a single string which looks like:</p>

<pre><code>6
0 1 1 0 0
1 1 1 1 0
0 0 0 1 0
4
1 1 0 1 0
0 0 0 1 0
1 1 0 1 0
0 1 1 0 0
</code></pre>

<p>and would like to split into two different strings such as:</p>

<pre><code>6
0 1 1 0 0
1 1 1 1 0
0 0 0 1 0
</code></pre>

<p>and the other string being:</p>

<pre><code>4
1 1 0 1 0
0 0 0 1 0
1 1 0 1 0
0 1 1 0 0
</code></pre>

<p>Would I do this using regex? Or is there a better way?
note: apart from the 6 and 4 the others numbers will always be 1 or 0.</p>
