import java.util.regex.*;

class Ideone {
	public static void main (String[] args) throws java.lang.Exception {
		final String regex = "(?:([\\w/.-]+)\\h*=|(?!^)\\G,)\\h*((\"?)[^\",]*\\3)";
		final String string = "SettingName = \"Value1\",0x2,3,\"Value4 contains spaces\", \"Value5 has a space before the string that is ignored\"";
		    
		final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
		final Matcher matcher = pattern.matcher(string);
		    
		while (matcher.find()) {
			if (matcher.group(1) != null)
				System.out.println(matcher.group(1));
			System.out.println("\t=> " + matcher.group(2));
		}

	}
}