I want the pattern for removing the &b=128&f=norefer from following url

后端 未结 3 1907
遇见更好的自我
遇见更好的自我 2020-12-22 11:45

http://www.yahoo.com &b=128&f=norefer

I want to remove &b=128&f=norefer

String finalUrl =decodedUrl.repl         


        
3条回答
  •  渐次进展
    2020-12-22 12:07

    you should be using URL object of java for this : http://download.oracle.com/javase/1.4.2/docs/api/java/net/URL.html#getHost()
    [search for getHost() method in it.]

提交回复
热议问题