/* Separar texto por comas, excepto entre comillas, con expresiones regulares
   https://es.stackoverflow.com/q/65502/127 */

import java.util.regex.Matcher;
import java.util.regex.Pattern;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		
		final String regex = ",(\"[^\"]*\"|[^,]*)";
		final String text  = ",10010222,\"The Royal Bank of Scotland, Niederlassung Deutschland\",10105,Berlin";
		
		final Pattern pattern = Pattern.compile(regex);
		final Matcher matcher = pattern.matcher("," + text);
		int n = 0;
		
		System.out.println("Texto original: " + text);
		
		while (matcher.find()) {
	        System.out.print  ("Elemento " + ++n + ": ");
	        System.out.println(matcher.group(1));
		}
	}
}