String a="showRunningAll();window.location='../../../../../SISEWeb/pub/studentstatus/studentBalanceAction.do?method=doStudentQuery&gzcode=q2An2BULSzE3GXHlT2tNrA=='"我想提取
a的SISEWeb/pub/studentstatus/studentBalanceAction.do?method=doStudentQuery&gzcode=q2An2BULSzE3GXHlT2tNrA=='
这部分 应该怎么操作?

解决方案 »

  1.   

    string = string.subString(0,string.lastIndexOf("/"));
    意思是把0到最后一个“/”之间的字符去掉,我看别人代码这么写的,自己没用过
      

  2.   

    哥们可以把java api翻开 好好看看String 类得方法.....
      

  3.   


    String str=a.subString(lastIndexOf("/")+1,str.length-1);
      

  4.   


    String str=a.subString(lastIndexOf("/")+1,str.length);
      

  5.   

    substring lastindexof is good
      

  6.   

    如果“SISE”固定的话
    String a="showRunningAll();window.location='../../../../../SISEWeb/pub/studentstatus/studentBalanceAction.do?method=doStudentQuery&gzcode=q2An2BULSzE3GXHlT2tNrA=='";
    int point=a.indexOf("SISEWeb");
    System.out.println(a.substring(point));