Here you can find the source of splitOnComma(String cs)
static List<String> splitOnComma(String cs)
//package com.java2s; //License from project: Apache License import java.util.List; import java.util.ArrayList; public class Main { static List<String> splitOnComma(String cs) { List<String> args = new ArrayList<String>(); if (cs == null) { return args; } else {/*from w ww. ja v a2s . c o m*/ String[] split = cs.split("(?<!\\\\),"); for (String arg : split) { args.add(arg.trim().replaceAll("\\\\,", ",")); } return args; } } }