Hello. I am have an application in Ruby on Rails. I need help with the following regular expression to find URL's contained anywhere in posted text and wrap them with <a href="URL">link</a> parameters so that they link in HTML. Two examples are below:
Check out http://www.xyz.com => Check out <a href="http://www.xyz.com">link</a>
and
Check out www.xyz.com => Check out <a href="http://www.xyz.com">link</a>
In the first example, the posting may contain http:// or https://. In the second example, the URL may just be a www. domain. The regular expression should handle both instances. I am at a loss... ;-(