/**
* 正则表达式,匹配 URL 是IP还是域名
*/
private static final String PATTERN_L2DOMAIN = "(?<=http://|\\.)[^.]*?\\.(com|cn|net|org|biz|info|cc|tv)";
private static final String PATTERN_IP = "(\\d*\\.){3}\\d*";
转载于:https://www.cnblogs.com/jabez1992/p/11557701.html