Change links in text to links without changing html tags
<p>I have written some code that change text links to links but it also changes the <code>src</code> attribute of my <code>img</code> tags to link like </p>

<pre><code>&lt;img src="some url"/&gt;&lt;br&gt;
http://google.com&lt;br&gt;
http://beezfeed.cu.ma&lt;br&gt;
</code></pre>

<p>Here my code change it to </p>

<pre><code>&lt;img src="&lt;a href="some url"&gt;some url&lt;/a&gt;"/&gt;&lt;br&gt;
&lt;a href="http://google.com"&gt;http://google.com&lt;/a&gt;&lt;br&gt;
&lt;a href="http://beezfeed.cu.ma"&gt;http://beezfeed.cu.ma&lt;/a&gt;&lt;br&gt;
</code></pre>

<p>I want it to leave img tag and do that thing with only text. Here is my code</p>

<pre><code>function make_links_clickable($text){
    return preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#? &amp;;//=]+)!i', '&lt;a href="$1"&gt;$1&lt;/a&gt;', $text);
 }
</code></pre>