String st="http://192.168.1.103:8080/sinoyunfront/disp/SjIntr.do?sjid=1&tempNum=1aaaaaaa";
String st1;
st1=st.replaceAll("http://192.168.1.103:8080/sinoyunfront/disp/SjIntr.do?sjid=1&tempNum=1","index.html");
System.out.println(st1);
怎么不能替换的,用什么方法呢
String st1;
st1=st.replaceAll("http://192.168.1.103:8080/sinoyunfront/disp/SjIntr.do?sjid=1&tempNum=1","index.html");
System.out.println(st1);
怎么不能替换的,用什么方法呢
不要用replaceall
用replace看下
String st1;
st1=st.replaceAll("http://192.168.1.103:8080/sinoyunfront/disp/SjIntr.do\\?sjid=1&tempNum=1","index.html");
System.out.println(st1);
angelseyes(名牌小学毕业生) 的可以啊!
非常谢谢您,