Created
July 27, 2009 03:48
-
-
Save marks/156014 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'uri' | |
| def remove_urls(text) | |
| urls = URI.extract(text) | |
| text.gsub(/#{urls}/, 'LINK') | |
| end | |
| puts remove_urls("check out my cool new video at my website at http://myspace.com/aesdf") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment