About the author

Love interactivity, programming, music and the web.

Currently work using Ruby/Rails, JavaScript and ActionScript, but know other languages.

Developer at Ocapi

Find me on

Auto-linking tweets in Ruby and Javascript

June 9th 2011

So, you are retrieving tweet messages, and want to build links for urls, mentions, and hashtags. Using any programming language it will looks the same to do that. The point here is the regular expression used.

Ruby version:

JavaScript version:

You can port it to the language you want to. And that’s it, hope it helps.

Tags: twitter regexp ruby javascript