私はこれを持っています
String str = "a,pnp,a|pnp,lab2|pnp,a|pnp,lab2,utr,utr";
String[] strings = str.split("|");
このコードは「|」の周りで分割されません 文字、代わりにそれはのようにすべての文字を分割します
strings[0] == "a";
strings[1] == ",";
等々。
これを機能させる方法
strings[0] == "a,pnp,a"
strings[1] == "pnp,lab2"
...