is Google Maps URL - Android App

Android examples for App:Popular App

Description

is Google Maps URL

Demo Code


//package com.java2s;

public class Main {
    public static boolean isMapsURL(String url) {
        return url
                .matches("http://maps\\.google\\.[a-z]{2,3}(\\.[a-z]{2})?[/?].*")
                || url.matches("http://www\\.google\\.[a-z]{2,3}(\\.[a-z]{2})?/maps.*");
    }/*from   w  ww. ja v  a 2 s  .c om*/
}

Related Tutorials