string[] SplitCsvLine(string line)
{
return (from Match m in Regex.Matches(line,
@"(((?<x>(?=[,\r\n] ))|""(?<x>([^""]|"""") )""|(?<x>[^,\r\n] )),?)",
RegexOptions.ExplicitCapture)
select m.Groups[1].Value).ToArray();
}
12 years ago
No comments:
Post a Comment