Есть более простой вариант
String url = "https://www.google.com.ua/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjM6qWHxsrOAhXLNxQKHY9pBW8QFggaMAA&url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F2572566%2Fjava-jpa-version-annotation&usg=AFQjCNHo2lEs_AU2l38GU9-kO2hGaR5F9g&sig2=1TYjOkH85bUsfa7ddPgSsQ&bvm=bv.129759880,d.bGg";
int beginIndex = url.indexOf("&url=") + 5;
int endIndex = url.indexOf('&', beginIndex);
String substring = url.substring(beginIndex, endIndex);
System.out.println(substring);
// http%3A%2F%2Fstackoverflow.com%2Fquestions%2F2572566%2Fjava-jpa-version-annotation
System.out.println(URLDecoder.decode(substring, "utf8"));
// http://stackoverflow.com/questions/2572566/java-jpa-version-annotation