Created
November 14, 2011 02:52
-
-
Save tibbon/1363126 to your computer and use it in GitHub Desktop.
Fixing Skype Links
This file contains 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
@skype_text = 'The <a href="http://www.imvox.com">bar</a> of <a href="http://foo.bar">cat</a>' | |
@skype_text.scan(/\S+">(\S+)<\/a>/).each do |link| | |
linktext = link[0] | |
@skype_text.gsub!(/<a href=\"\S+#{linktext}<\/a>/, linktext) | |
end | |
p @skype_text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment