public static YouTubeVideo matchURL(String url,String text){
  Matcher m=URL_PATTERN.matcher(url);
  if (m.matches()) {
    return new YouTubeVideo(m.group(1),text);
  }
 else {
    return null;
  }
}

public static YouTubeVideo matchURL ( String url , String text ) { Matcher m = URL_PATTERN . matcher ( url ) ; if ( m . matches ( ) ) { return new YouTubeVideo ( m . group ( 1 ) , text ) ; } else { return null ; } }
returns a video object if the given url is to a video .
