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 a  2s .c  om
        return Pattern.matches(URL_REG_EXPRESSION, s);
    }
}

Related

  1. extracURL(String _str)
  2. isUrl(String str)
  3. isUrl(String s)
  4. isUrlValid(String str)
  5. isHttpUrl(String input)