@ 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:
Costantino Perciante 2018-01-19 13:38:38 +00:00
parent f3849aed70
commit b0fc505c1b
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ public class Utils {
"(\\w+:\\w+@)?((([-\\w]+\\.)+(com|org|net|gov" +
"|mil|biz|info|mobi|name|aero|jobs|museum" +
"|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}])+=?" +

View File

@ -17,7 +17,7 @@ public class TestUnit {
//@Test
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);
System.out.println("urls are " + result);
}