Skip to content

Instantly share code, notes, and snippets.

@mzsanford
Created July 7, 2010 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mzsanford/466949 to your computer and use it in GitHub Desktop.
Save mzsanford/466949 to your computer and use it in GitHub Desktop.
# Shell commands:
# ∴ sudo gem install twitter-text
# ∴ ruby script/console
Loading development environment (Rails 2.3.5)
>> require 'twitter-text'
=> []
>> include Twitter::Extractor
=> Object
>> urls = extract_urls("This has a url: http://twitter.com")
=> ["http://twitter.com"]
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment