Java Parsing strings : <p>I got .txt file with nationalities and phone numbers in different formats and all these in single quote symbols, also it contains empty lines (''):  </p>

<pre><code>''   
'French'   
'1-500'   
'0345134123'   
''   
''   
'German'  
etc  
</code></pre>

<p>after I parse with the help of <code>readLine()</code> I got <code>arr[0]</code> with each of these lines.<br>
I need to put lines into different arrays: lines with 'nationality' into one array and lines with 'phone numbers' into other.<br>
I tried this </p>

<pre><code>if(!arr[0].equals("''")){
   String[] arr1 = arr[0].split("'");
   if(!arr1[1].matches("[0-9]+)"){
     nations[n] = arr1[1];
     n++;
   }
   else {
     phone_numbers[p] = arr1[1];
     p++;
   }
}
</code></pre>

<p>Ofcourse it didn't work</p>
