lst devip:;
LTE_1
+++ 0 2013-01-07 11:41:17
O&M #12797
%%/*2641*/lst devip:;%%
RETCODE = 0 Operation succeeded.List Device IP Configuration Data
---------------------------------
Cabinet No. = 0
Subrack No. = 0
Slot No. = 7
Subboard Type = Base Board
Port Type = Ethernet Port
Port No. = 1
VRF Index = 0
IP Address = 10.157.158.58
Mask = 255.255.255.0
(Number of results = 1)
--- END
上面是一个字符串。 我要获取 Slot No. = 7 里面的 7。 也就是要得到7
LTE_1
+++ 0 2013-01-07 11:41:17
O&M #12797
%%/*2641*/lst devip:;%%
RETCODE = 0 Operation succeeded.List Device IP Configuration Data
---------------------------------
Cabinet No. = 0
Subrack No. = 0
Slot No. = 7
Subboard Type = Base Board
Port Type = Ethernet Port
Port No. = 1
VRF Index = 0
IP Address = 10.157.158.58
Mask = 255.255.255.0
(Number of results = 1)
--- END
上面是一个字符串。 我要获取 Slot No. = 7 里面的 7。 也就是要得到7
解决方案 »
- 关于ongl取值的问题,请教一下大伙
- 关于使用hibernate生成oracle10的问题(小问题)
- 请问jasperreport有没有接口,可以支持在我自己写的程序中调用它的报表设计器?
- 如何获得动态复选框中<html:multibox/>的所有选中的值
- 求助http status 500错误.
- file.getName()的编码是怎么样确定的
- 各位java大哥,关于读取XML文件,怎么做啊?
- weblogic7 连接数据库的问题
- 这样的CMP的EJB怎么写??
- int[] arr = new int[]{10,99};与int[]arr = {10,99}的不同
- JNI Exception in thread "main" java.lang.UnsatisfiedLinkError:函数名(V)
- Excel导入时外键的代码如何处理
String str="all string.";
String slotNo = str.substring(str.indexOf("Slot No. = "),1);
System.out.println(slotNo);
}
start=start+"Slot No. = ".length;//这里加上"Slot No.= "的长度就是后面的起始位置了
int end=start+1;//结束位置就是起始位置+1;
String slotNo=str.subString(start,end);
System.out.println(slotNo);
String str = "改成上面的字符串";
String no = str.replaceAll(".*?Slot No.\\p{Space}*=\\p{Space}*(\\d)+.*" , "$1");
System.out.println(no);