Skip to content

Instantly share code, notes, and snippets.

@douglasnomizo
Created December 12, 2014 21:21
Show Gist options
  • Save douglasnomizo/497a249850b411ee5b71 to your computer and use it in GitHub Desktop.
Save douglasnomizo/497a249850b411ee5b71 to your computer and use it in GitHub Desktop.
def remove_tuples_from(string)
string.gsub! ' ', ''
string.gsub! /\(\)|[\,]?\([\d]*((\d\,)*\d)*\)|\(\)|\([\d]*((\d\,)*\d)*\)[\,]+|\(\)|\([\d]*((\d\,)*\d)*\)/x, ''
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment