Skip to content

Instantly share code, notes, and snippets.

@reinh
Created February 21, 2011 17:50
Show Gist options
  • Select an option

  • Save reinh/837416 to your computer and use it in GitHub Desktop.

Select an option

Save reinh/837416 to your computer and use it in GitHub Desktop.
sep = "'''" # some string delimiter that won't be found in the text
string.gsub('"', "#{sep}").gsub("\\#{sep}", '\"').scan(/#{sep}(.+?)#{sep}/m)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment