Maj*_* ff 1 java regex ip android
例:
xxx.xxx.xxx.xxx是IP地址格式,我只想获取前三个段(带点):xxx.xxx.xxx。
另一个例子:
192.168.0.160,我只需要192.168.0。
Dan*_*ssy 5
String[] splittedArray = ipAddressString.split("\\."); String firstThreeSegments = splittedArray [0] + "." + splittedArray [1] + "." + splittedArray [2] + ".";
归档时间:
11 年,9 月 前
查看次数:
1668 次
最近记录: