<html>
</head>
<body>
<div id="main" flowid="B0JNyhc2tjPglJs5">
<iframe border="0" marginwidth="0" framespacing="0" marginheight="0" src="to-preparation.do;WLS_HTTP_BRIDGE_PA18SHOP=PbPJpcgsmbJxNTGvMyMGnF41DQtc5hdnQGLWhR0SS2N6q25Z18Xc!-1972506560?provinceCode=320000&cityCode=320100&flowid=B0JNyhc2tjPglJs5" frameborder="0" noresize="noresize" scrolling="no" width="100%" height="700px" vspale="0" id="childframe"></iframe>
</div>
</body>
</html>能否帮忙匹配成to-preparation.do??provinceCode=320000&cityCode=320100&flowid=B0JNyhc2tjPglJs5
也就是src后面的WLS_HTTP_BRIDGE_PA18SHOP=PbPJpcgsmbJxNTGvMyMGnF41DQtc5hdnQGLWhR0SS2N6q25Z18Xc!-1972506560不要

解决方案 »

  1.   

    to-preparation.do?provinceCode=320000&cityCode=320100&flowid=B0JNyhc2tjPglJs5
    一个问号,不是2个
      

  2.   


          Pattern pp = Pattern.compile("(to-preparation.do).*(\\?provinceCode[^\"]*)");
          Matcher mmm =  pp.matcher("src=\"to-preparation.do;WLS_HTTP_BRIDGE_PA18SHOP=PbPJpcgsmbJxNTGvMyMGnF41DQtc5hdnQGLWhR0SS2N6q25Z18Xc!-1972506560?provinceCode=320000&cityCode=320100&flowid=B0JNyhc2tjPglJs5\" frameborder=\"0\" noresize=\"noresize\" scrolling=\"no\" width=\"100%\"");
    while(mmm.find()){
         System.out.println(mmm.group(1)+mmm.group(2));
    }