【发布时间】:2015-12-18 04:54:12
【问题描述】:
假设我有这个字符串
[0] playerName19 [1] playerName17 [2] playerName18 [3] playerName15 [4] playerName59 [5] playerName16 [6] playerName6 [7] playerName60
如何使用 Java 将其拆分成这样的:
[0] playerName19, [1] playerName17, [2] playerName18...
我尝试使用 split() 但问题是 playerName 号码扩展是随机生成的,并且每个查询都会更改。
【问题讨论】:
-
您需要将初始字符串拆分或将初始字符串更改为以逗号分隔的第二个?
标签: java regex string split substring