Java tutorial
//package com.java2s; public class Main { public static boolean isYouTubeURL(String url) { return url.matches("http[s]://www\\.youtube\\.[a-z]{2,3}(\\.[a-z]{2})?/.*"); } }