I would like to parse the following text into formatted URLs with anchor tags:
something is wrong with http://www.gbin1.com/index.html, but cannot find the reason in http://www.google.com
How can I replace the text URLs above with <a href="url">url</a> and also shorten it using JavaScript as displayed below:
something is wrong with <a href="http://www.gbin1.com/index.html">gbin1.com</a>, but cannot find the reason in <a href="http://www.gbin1.com">google.com</a>
Check this solution.
http://jsfiddle.net/4JGY7/