Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html web爬虫越界解析_Html_String - Fatal编程技术网

Html web爬虫越界解析

Html web爬虫越界解析,html,string,Html,String,我有以下两种方法, public void connect (String website) throws IOException { URL u = new URL(website); URLConnection conn = u.openConnection(); 为什么不使用正则表达式查找链接S或html解析器库[实际上是regex nyway]

我有以下两种方法,

public void connect (String website) throws IOException {
    URL u = new URL(website);
    URLConnection conn = u.openConnection();

为什么不使用正则表达式查找链接S或html解析器库[实际上是regex nyway]