网页WebURL的正则表达式(内部和外部链接)

时间:2018-04-11 17:47:25

标签: asp.net c#-4.0

我正在尝试从网页中获取所有href网址 Foreg:example.htm        https://www.myexample.com/awards-recognition.htm">

所有网址都应该被提取,尽管它的开头是http | https not。

我试过跟随Regex:@"<(a).*?href=(""|')(.+?)(""|').*?>" 但没有按预期得到输出。

任何人都可以帮助为上述场景定义正则表达式吗?

0 个答案:

没有答案