SO jQuery Fiddle

Test Fiddle mainly for SO Questions jQuery 1.4.3, UI 1.8.5

by Nick Craver

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/ui-lightness/jquery-ui.css">

JavaScript

var src = "bla blaaa blaaaaaa 1  http://yahoo.com  text something about and. http://www.google.com";
var res = src.replace(/http:\/\/([a-z0-9.-]+)/, '<a href="\0">\0</a>');
alert(res);