Android String to URL Convert isUrl(String s)

Here you can find the source of isUrl(String s)

Description

is Url

Declaration

public static boolean isUrl(String s) 

Method Source Code

//package com.java2s;
import java.util.regex.Pattern;

public class Main {
    public static final String URL_REG_EXPRESSION = "^(https?://)?([a-zA-Z0-9_-]+\\.[a-zA-Z0-9_-]+)+(/*[A-Za-z0-9/\\-_&:?\\+=//.%]*)*";

    public static boolean isUrl(String s) {
        if (s == null) {
            return false;
        }/*from w  ww .ja v  a2s .com*/
        return Pattern.matches(URL_REG_EXPRESSION, s);
    }
}

Related

  1. extracURL(String _str)
  2. isUrl(String s)
  3. isUrl(String str)
  4. isUrlValid(String str)
  5. isHttpUrl(String input)
  6. getDomain(String url)
  7. findUrl(StringBuilder sb)