java去除采集网页多余标签和内容正则
//定义script的正则表达式{或<script[^>]*?>[\\s\\S]*?<\\/script> String regEx_script = "<[\\s]*?script[^>]*?>[\\s\\S]*?<[\\s]*?\\/[\\s]*?script[\\s]*?>"; //定义style的正则表达式{或<style[^>]*?>[\\s\\S]*?<\\/style> String regEx_style = "<[\\s]*?style[^>]*?>[\\s\\S]*?<[\\s]*?\\/[\\s]*?style[\\s]*?>"; // 定义HTML标签的正则表达式 String regEx_html = "<[^>]+>"; // 定义一些特殊字符的正则表达式 如: String regEx_special = "\\&[a-zA-Z]{1,10};";
⎛⎝官萧何⎠⎞一只快乐的爪哇程序猿;邮箱:1570608034@qq.com

浙公网安备 33010602011771号