Replace string using php preg_replace
<p>Hi all i know preg_replace can be used for formatting string but i need help in that concerned area my url will be like this</p>

<p><a href="http://www.example.com/index.php/" rel="nofollow">http://www.example.com/index.php/</a><br>
also remove the http,https,ftp....sites also</p>

<p>what i want is to get 
result as</p>

<p>example.com/index.php</p>
