title: vBulletin URL replace code
body: <p>I was previously asking for a smiliar function, but no one of them are like the vBulletin 4 has.</p>
  
  <p>I mean if I paste some URL's in the vBulletins text box it will replace them for example like this:</p>
  
  <p>Input:</p>
  
  <pre><code>http://www.stackoverflow.com/questions/1925455/how-to-mimic-stackoverflow-auto-link-behavior
  http://yahoo.com/
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>php - How to mimic StackOverflow Auto-Link Behavior - Stack Overflow
  Yahoo!
  </code></pre>
  
  <p>And this is the best of all, because if the URL doesn't exist (or don't have  tags) it'll just stay with the URL path!</p>
  
  <p>Input:</p>
  
  <pre><code>http://fake.url
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>http://fake.url
  </code></pre>
  
  <p>Then message BBCODE looks following:</p>
  
  <pre><code>[url=http://www.stackoverflow.com/questions/1925455/how-to-mimic-stackoverflow-auto-link-behavior]php - How to mimic StackOverflow Auto-Link Behavior - Stack Overflow[/url]
  [url=http://yahoo.com/]Yahoo![/url]
  [url]http://fake.url[/url]
  </code></pre>
  
  <p>How do they do that?
  Is it possible to do with PHP/JS? If so, could you direct me how?</p>
  
  <p>Kind Regards,</p>
  
  <p>Lucas.</p>