is Valid Url by regex - Android java.util.regex

Android examples for java.util.regex:URL Pattern

Description

is Valid Url by regex

Demo Code


//package com.java2s;
import android.util.Patterns;

public class Main {
    public static boolean isValidUrl(final CharSequence target) {
        return target != null && Patterns.WEB_URL.matcher(target).matches();
    }//from   ww  w.  ja  v a2 s  . c om
}

Related Tutorials