Ruby: Enliven twitter links (or auto_link for @twitter) My solution text.gsub(/(@(\S+))/i, '<a href="http://twitter.com/\2">\1') [Just for the search engines…]