Skip to content

Instantly share code, notes, and snippets.

@tibbon
Created November 14, 2011 02:52
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 tibbon/1363126 to your computer and use it in GitHub Desktop.
Save tibbon/1363126 to your computer and use it in GitHub Desktop.
Fixing Skype Links
@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