0
我想用正則表達式拆分字符串。但它不起作用,內容將全部移到字符串數組的第一個數組位置。這不正確嗎?:用正則表達式拆分字符串
scanResult不相關,只是一個簡單的字符串。
StringBuffer scanList = new StringBuffer();
for cycle{
scanList.append("SPl"+scanResult.SSID+"ID:"+scanResult.BSSID);
}
String result=scanList.toString();
String[] actual=result.split("SP1");