List of utility methods to do URL String Validate
boolean | isValidUrl(String linkToCheck) is Valid Url Pattern urlPattern = Pattern .compile("^((https?:\\/\\/(www)?)|(www)).+(\\..{2,4})(\\/)?.+$"); Matcher urlMatcher = urlPattern.matcher(linkToCheck); return urlMatcher.matches(); |
boolean | isUrl(String s) is Url if (s == null) { return false; return Pattern.matches(URL_REG_EXPRESSION, s); |