Java String.split() on comma followed by non-whitespace

后端 未结 1 596
[愿得一人]
[愿得一人] 2021-01-20 19:48

I\'m parsing a dataset which annoyingly decided to comma-delimit items in a TSV (PharmaGKB pathways, I\'m looking at you), but allow commas in each logical element.

1条回答
  •  囚心锁ツ
    2021-01-20 20:15

    Positive lookaheads:

    a.split(",(?=\\S)");
    

    0 讨论(0)
提交回复
热议问题