title: How to change the href (url) in a link (a) element?
body: <p>Here is my full link.</p>
  
  <pre><code>&lt;a href="http://localhost/mysite/client-portal/"&gt;Client Portal&lt;/a&gt;
  </code></pre>
  
  <p>I want above link to look like following.</p>
  
  <pre><code>&lt;a href="#popup"&gt;Client Portal&lt;/a&gt;
  </code></pre>
  
  <p>I really don't know how to work with preg_replace to get this done.</p>
  
  <pre><code>preg_replace('\/localhost\/mysite\/client-portal\/', '#popup', $output)
  </code></pre>