1.废话不说,看代码
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class EmailRegexDemo {
private static final String TARGET_URL = "http://tieba.baidu.com/p/2314539885";
public static void main(String[] args) {
try {
String content = HttpUtils.get(TARGET_URL, null);
Matcher matcher = Pattern.compile(PatternUtils.EMAIL_REGEX).matcher(content);
while (matcher.find()) {
System.out.println(matcher.group());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
代码地址(码云):https://gitee.com/jsjack_wang/JavaDemo
网友评论