title: PHP special regular expression pattern to match URLs after a specific string
body: <p>I'm trying to develop a word counting application that supports .pdf, .docx, .doc, .txt, ..etc documents and I was able to read .doc files with PHP and load the plain text to a variable.</p>
  
  <p>I'm using following code to remove extra white spaces of the string.</p>
  
  <pre><code>$str = trim(preg_replace('/\s+/', ' ', $str));
  </code></pre>
  
  <p>My issue is: Word documents with hyperlinks are phrasing as <code>Some dummy text here.. HYPERLINK "http://domain.com/directory/page" other dummy text is here..</code></p>
  
  <p>So I want to remove that <code>HYPERLINK "http://domain.com/directory/page"</code> part or replace with a space or something.</p>
  
  <p>Since I'm not a regular expression expert, I'm looking for help to solve this problem.
  Thanks!</p>