如何将包含多行的子串的字符串拆分成一行字符串数组?
例如,
"1234","01",111,AreaA,10/10/2017 11:13:10,
1,10/09/2017 18:45:00,23296151,"JOHN","- 11/09/2017 18:45:19 U JOHN 0036
CONFIRMED",
2,11/09/2017 14:25:00,23296151,"BECCA","- 11/09/2017 15:45:19 U BECCA 0036
CONFIRMED",
当前代码:
string[] stringSeparators = { "\r\n" };
string[] lines = auditMessage.Split(stringSeparators, StringSplitOptions.None);
返回:
""1234","01",111,AreaA,10/10/2017 11:13:10,"
" 1,10/09/2017 18:45:00,23296151,"JOHN","- 11/09/2017 18:45:19 U JOHN 0036"
" CONFIRMED","
" 2,11/09/2017 14:25:00,23296151,"BECCA","- 11/09/2017 15:45:19 U BECCA 0036"
" CONFIRMED","
我想要归还的内容:
""1234","01",111,AreaA,10/10/2017 11:13:10,"
" 1,10/09/2017 18:45:00,23296151,"JOHN","- 11/09/2017 18:45:19 U JOHN 0036 CONFIRMED","
" 2,11/09/2017 14:25:00,23296151,"BECCA","- 11/09/2017 15:45:19 U BECCA 0036 CONFIRMED","