-1
我在Regex中并不是很出色。正则表达式分割为逗号和双引号CSV格式
字符串:
"FF","asdadasd60","Report,License","502","5A1301","I-Web Report,License","50A1","PR02","02","5A11","REL","","","","A1170600","500008","FA10","5000001","","","","","000000000.000","","000000000.000","","000000000.000","","000000000.000","","00000000","00000000","",""
我已经这样做了,但之前删除双引号。但字符串Report,License
和I-Web Report,License
的结果被分割。这是错误的。
我想通过双引号之间的逗号分割它,而不是在它们内部。
我会做手动。你知道,'List','''loop和'Substring'。我猜,这是更高性能的。 –
var values = Regex.Split(line,“,(?=(?:[^ \”] * \“[^ \”] * \“)* [^ \”] * $)“); – evilom