我现在有一个地址假设是:
http://demo/demo?src=htttp://baidu.com/1.mv&dst=/test/test&mds=123123123123
我现在需要写一个正则表达式把src 的值即:htttp://baidu.com/1.mv 和dst的值:/test/test 以及md5的值即:123123123123取出来
各位 有没有什么好想法的
------解决思路----------------------
String s = "http://demo/demo?src=htttp://baidu.com/1.mv&dst=/test/test&mds=123123123123";
Matcher m = Pattern.compile("src=(.*?)&dst=(.*?)&mds=(.*)").matcher(s);
while (m.find()) {
System.out.println(m.group(1)+"---->"+m.group(2)+"---->"+m.group(3));
}