Skip to content
  • Home
  • About
  • google03d8740672838558.html
  • Places to stay in NH

Feeds

RSS Feed RSS - Posts

RSS Feed RSS - Comments

I need a better pic:

Pages

  • About
  • Places to stay in NH

Folks

  • a quietlyhelping.org
  • Chris Adler
  • Cool Stuff
  • Daniel's Github
  • Exaltation
  • Jenni Laurita
  • Luke Melia
  • Mike Curiak
  • Reckless
  • Seth Dillingham
  • Spoken
  • VividExcellence
December 2009
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Nov   Jan »

Archives

turnings :: daniel berlinger

Finest Quality Mayhem :: Reckless Precision

Menu
Widgets
Search

Day: December 29, 2009

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…]

December 29, 2009Daniel 1 Comment
Blog at WordPress.com.
  • Follow Following
    • turnings :: daniel berlinger
    • Join 599 other followers
    • Already have a WordPress.com account? Log in now.
    • turnings :: daniel berlinger
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar