Here you can find the source of parseURL()
String.prototype.parseURL = function() { return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&~\?\/.=]+/g, function(url) { return url.link(url); });// w w w. ja v a 2 s. com }; String.prototype.parseUsername = function() { return this.replace(/[@]+[A-Za-z0-9-_]+/g, function(u) { var username = u.replace("@","") return u.link("http://twitter.com/"+username); }); }; String.prototype.parseHashtag = function() { return this.replace(/[#]+[A-Za-z0-9-_]+/g, function(t) { var tag = t.replace("#","%23") return t.link("http://search.twitter.com/search?q="+tag); }); }; function linkify(text) { return text.parseURL().parseUsername().parseHashtag(); }
String.prototype.parseURL = function() { return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&~\?\/.=@]+/g, function(url) { return url.link(url); }); };
String.prototype.parseURL = function() { return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/g, function(url) { return url.link(url); }); };
String.prototype.parseURL = function() { return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&~\?\/.=]+/g, function(url) { return url.link(url); }); };
String.prototype.parseURL = function() { return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/, function(url) { return url.link(url); }); };
String.prototype.parseURL = function () { var string = String(this), url = { protocol: undefined, server: undefined, resource: undefined }, regExUrlParse = /(\w{3,10}):\/\/([A-z.]+)\/(.+)/g, parsedArr = regExUrlParse.exec(string); ...
String.prototype.parseURL = function() { return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&~\?\/.=]+/g, function(url) { return url.link(url); }); };