Skip to content

Instantly share code, notes, and snippets.

@JonCrawford
Created November 19, 2008 21:17
Show Gist options
  • Save JonCrawford/26725 to your computer and use it in GitHub Desktop.
Save JonCrawford/26725 to your computer and use it in GitHub Desktop.
str = "So don't return this (but do return this)"
start = str.index("(")+1
stop = str.rindex(")")-1
str[start..stop]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment