我有以下文字:
  submitted by   <a href="https://www.reddit.com/user/Leon91"> /u/Leon91 </a> <br/> <span><a href="https://www.dailymail.co.uk/news/article-7646171/Jared-Kushner-greenlit-arrest-jamal-Khashoggi-phone-call-Saudi-Prince.html">[link]</a></span>   <span><a href="https://www.reddit.com/r/worldnews/comments/drfnas/jared_kushner_greenlit_arrest_of_jamal_khashoggi/">[comments]</a></span>
我想获取不是来自reddit.com
的所有链接,例如链接https://www.dailymail.co.uk/news/article-7646171/Jared-Kushner-greenlit-arrest-jamal-Khashoggi-phone-call-Saudi-Prince.html
的结果。
我尝试了以下匹配所有URL的内容:
(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})
但是,我想要所有非reddit.com的网址。
任何建议如何解决这个问题?
感谢您的答复!