我不知道如何分割字符串:多重分割字符串在C#中
的字符串是'Allocation: Randomized, Endpoint Classification: Safety Study, Intervention Model: Single Group Assignment, Masking: Double Blind (Subject, Caregiver, Investigator, Outcomes Assessor), Primary Purpose: Treatment'
目前使用的分裂语法:
string.Split(',');
结果:
[0]: Allocation: Randomized
[1]: Endpoint Classification: Safety Study
[2]: Intervention Model: Single Group Assignment
[3]: Masking: Double Blind (Subject,
[4]: Caregiver,
[5]: Investigator,
[6]: Outcomes Assessor)
[7]: Primary Purpose: Treatment
但我想要的结果是:
[0]: Allocation: Randomized
[1]: Endpoint Classification: Safety Study
[2]: Intervention Model: Single Group Assignment
[3]: Masking: Double Blind (Subject, Caregiver, Investigator, Outcomes Assessor)
[4]: Primary Purpose: Treatment
有人能帮我纠正我的字符串拆分语法吗?
做任何给定的答案适合你吗? – fubo