This is David Walsh’s String.Tweetify in jQuery.
$.fn.tweetify = function() {
this.each(function() {
$(this).html(
$(this).html()
.replace(/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi,'$1')
.replace(/(^|\s)#(\w+)/g,'$1#$2')
.replace(/(^|\s)@(\w+)/g,'$1@$2')
);
});
return $(this);
}
$("p").tweetify();
Before:
<p>@seanhood have you seen this http://icanhascheezburger.com/ #lol</p>
After:
<p><a href="http://twitter.com/seanhood">@seanhood</a> have you seen this
<a href="http://icanhascheezburger.com/">http://icanhascheezburger.com/</a>
<a href="http://search.twitter.com/search?q=%23lol">#lol</a></p>

Comments
This web page is known as a stroll-by means of for all the data you needed about this and didn’t know who to ask. Glimpse here, and also you’ll definitely uncover it.
An fascinating discussion is price comment. I think that it is best to write more on this subject, it might not be a taboo subject however typically people are not sufficient to speak on such topics. To the next. Cheers
I used to be very pleased to search out this net-site.I wanted to thanks for your time for this excellent read!! I undoubtedly having fun with every little little bit of it and I’ve you bookmarked to take a look at new stuff you weblog post.
I’m just commenting to let you know what a outstanding discovery my cousin’s girl encountered going through your internet website. She noticed several details, which incorporate how it’s like to possess an perfect coaching spirit to let other people smoothly learn a number of grueling subject areas. You truly did a lot more than visitors’ desires. Thank you for distributing these fantastic, dependable, informative and unique suggestions on that subject to Tanya.
Hands down, Apple’s app store wins by a mile. It’s a huge selection of all sorts of apps vs a rather sad selection of a handful for Zune. Microsoft has plans, especially in the realm of games, but I’m not sure I’d want to bet on the future if this aspect is important to you. The iPod is a much better choice in that case.
It uses the default search twitter, and interesting as well if we use the default search our web/blog…
thanks^^
Ahh, you went with HTML. My thinking was “What do I use? HTML? Text? What if it’s a form? Value?” That was my frustration. Nice work!