string ss = "'64031,TJ,Han',100401,54321,IL,CA,1075,10000,30,4000"; System.Text.RegularExpressions.Regex reg3 = new System.Text.RegularExpressions.Regex("['](.*)[']|[,]"); ///开始分割字符串 string[] name = reg3.Split(ss);
------解决方案--------------------
C# code
string str = "'64031,TJ,Han',100401,54321,IL,CA,1075,10000,30,4000";
string[] result = Regex.Split(str, @"(?<!'[^,]+),(?![^,]+')");
foreach(string s in result)
Console.WriteLine(s);
------解决方案--------------------