Java Regex URL Validate isURL(String url)

Here you can find the source of isURL(String url)

Description

is URL

License

Open Source License

Declaration

public static boolean isURL(String url) 

Method Source Code


//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
    }
}

Related

  1. isUrl(String s)
  2. isUrl(String s)
  3. IsUrl(String str)
  4. isUrl(String test)
  5. isUrl(String text)
  6. isUrl(String url)
  7. isURL(String url)
  8. isUrl(String x)
  9. isUrlAddress(String text)