Here you can find the source of isURL(String url)
public static boolean isURL(String url)
//package com.java2s; //License from project: Open Source License import java.util.regex.Pattern; public class Main { public static boolean isURL(String url) { return Pattern.matches( "^(https?://(w{3}\\.)?)?\\w+\\.\\w+(\\.[a-zA-Z]+)*(:\\d{1,5})?(/\\w*)*(\\??(.+=.*)?(&.+=.*)?)?$", url);//from w ww .java2 s .c o m } }