I have a simple Rails app that collects all the tweets I favorite on Twitter so I can sort and search through them at my leisure. Many of those favorites contain links I'd like to refer to, so I wrote a helper method that converts them to clickable anchor tags that looked like this:
# app/helpers/favorites_helper.rb
module FavoritesHelper
# snip
def text_to_true_link(tweet_text)
urls = tweet_text.scan(/https*:\/\/t.co\/\w+/)