title: PHP. Remove Links from Strings
body: <p>Helllo, I have some user-generated content on the website. I want to remove links out of it using php functions.</p>
  
  <p>For example I have the following string: </p>
  
  <pre><code>"text1 http://link1 text2 www.link2 text3 link3.com text4"
  </code></pre>
  
  <p>Is there a simple way to detect words, containing http:, www., .com and to remove them from text? Or is there any other good way of cleaning the text from links?</p>
  
  <p>Thank you for your time!</p>