我需要example.de在 Go 中使用 Regex从特定域中的文本获取所有链接
以下是应提取的所有可能链接:
https://example.de https://example.de/ https://example.de/home https://example.de/home/ https://example.de/home some text that should not be extracted https://abc.example.de https://abc.example.de/ https://abc.example.de/home https://abc.example.de/home https://abc.example.de/home some text that should not be extracted
我使用这个网站来检查我的正则表达式是否正确: https ://regex101.com/r/ohxUcG/2 以下是失败的组合:
https?://*.+example.de*.+表达失败,https://abc.example.de/a1b2c3 dsadsa将整个文本转移到\n而不是https://abc.example.de/a1b2c3没有dsadsa
https?://*.+example.de*.+\s(\w+)$这会获取仅以空格终止的链接,但有时链接可以以\n或\t等终止。
慕尼黑8549860
森林海
随时随地看视频慕课网APP
相关分类