Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/17.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
C# 解析HTML页面以提取链接_C#_Regex - Fatal编程技术网

C# 解析HTML页面以提取链接

C# 解析HTML页面以提取链接,c#,regex,C#,Regex,我想解析html文件并从 我使用以下正则表达式 private const string _LINK_REGEX = "href=\"[a-zA-Z./:&\\d_-]+\""; 但我无法提取此url 您可以使用: href=\"[^\"]+\" 试验

我想解析html文件并从

我使用以下正则表达式

private const string _LINK_REGEX = "href=\"[a-zA-Z./:&\\d_-]+\"";
但我无法提取此url

您可以使用:

href=\"[^\"]+\"
试验