Skip to content

Instantly share code, notes, and snippets.

@jwerre
Created November 21, 2012 19:54
Show Gist options
  • Save jwerre/4127255 to your computer and use it in GitHub Desktop.
Save jwerre/4127255 to your computer and use it in GitHub Desktop.
replace bracketed numbers in strings with options
_.flatten( _.zip( def.split(/\{[0-9]\}/), options ) ).join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment