Regex 使用正则表达式提取链接
如何使用正则表达式提取所有链接 链接示例:Regex 使用正则表达式提取链接,regex,vb.net,visual-studio-2010,Regex,Vb.net,Visual Studio 2010,如何使用正则表达式提取所有链接 链接示例: <a class="link" title="somehing" href="https://www.website.com/link" data-jsid="anchor" target="_blank"> (more html stuff..) I want to this: https://www.website.com/link 你可以用像 href="([^"]+)" [^”]+匹配除“ 例如: 这里,capture g
<a class="link" title="somehing" href="https://www.website.com/link" data-jsid="anchor" target="_blank"> (more html stuff..)
I want to this: https://www.website.com/link
你可以用像
href="([^"]+)"
匹配除[^”]+
“
https://www.website.com/link
或
您还可以使用非贪婪的+?
作为
href=".+?"
例如:
或
你可以试试后面看
(?<=href=")([^"]+)
(?不带“href=”标签。如果可以的话,请只给我发与VB兼容的正则表达式。我的正则表达式很差。
(?<=href=")([^"]+)