public static void main(String[] args) {
  String url = "http://www.ywfuxing.com/index.php?types=login&action=login";
  Pattern p = Pattern.compile(
    "(?<=http://|\\.)[^.]*?\\.(com|cn|net|org|biz|info|cc|tv)",
    Pattern.CASE_INSENSITIVE);
  Matcher matcher = p.matcher(url);
  matcher.find();
  System.out.println(matcher.group());

 }

posted on 2010-05-27 15:13  一代黑客  阅读(53)  评论(0)    收藏  举报