@ symbol added in the url regex for path, see #10987
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/social-networking/social-util-library@162359 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f3849aed70
commit
b0fc505c1b
|
@ -59,7 +59,7 @@ public class Utils {
|
||||||
"(\\w+:\\w+@)?((([-\\w]+\\.)+(com|org|net|gov" +
|
"(\\w+:\\w+@)?((([-\\w]+\\.)+(com|org|net|gov" +
|
||||||
"|mil|biz|info|mobi|name|aero|jobs|museum" +
|
"|mil|biz|info|mobi|name|aero|jobs|museum" +
|
||||||
"|travel|[a-z]{2,5}))|("+ IPV4_REGEX +")|(\\["+ IPV6_REGEX +"\\]))(:[\\d]{1,5})?" +
|
"|travel|[a-z]{2,5}))|("+ IPV4_REGEX +")|(\\["+ IPV6_REGEX +"\\]))(:[\\d]{1,5})?" +
|
||||||
"(((\\/([-\\w~!$+|.,=]|%[a-fA-F\\d]{2})+)+|\\/)+|\\?|#)?" +
|
"(((\\/([-\\w~!$+@|.,=]|%[a-fA-F\\d]{2})+)+|\\/)+|\\?|#)?" +
|
||||||
"((\\?([-\\w~!$+|.,*:]|%[a-fA-F\\d{2}])+=?" +
|
"((\\?([-\\w~!$+|.,*:]|%[a-fA-F\\d{2}])+=?" +
|
||||||
"([-\\w~!$+|.,*:=]|%[a-fA-F\\d]{2})*)" +
|
"([-\\w~!$+|.,*:=]|%[a-fA-F\\d]{2})*)" +
|
||||||
"(&(?:[-\\w~!$+|.,*:]|%[a-fA-F\\d{2}])+=?" +
|
"(&(?:[-\\w~!$+|.,*:]|%[a-fA-F\\d{2}])+=?" +
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class TestUnit {
|
||||||
//@Test
|
//@Test
|
||||||
public void extractUrl(){
|
public void extractUrl(){
|
||||||
|
|
||||||
String url = " test http://[2001:db8:0:1:1:1:1:1]:8080/group/preeco/what-if?p_p_id=simul_WAR_simulfishgrowthportlet&p_p_lifecycle=0 ";
|
String url = " test http://2001:db8:0:1:1:1:1:1:8080/group/preeco/what-if?p_p_id=simul_WAR_simulfishgrowthportlet&p_p_lifecycle=0 ";
|
||||||
String result = Utils.extractURL(url);
|
String result = Utils.extractURL(url);
|
||||||
System.out.println("urls are " + result);
|
System.out.println("urls are " + result);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue