Created
November 21, 2012 19:54
-
-
Save jwerre/4127255 to your computer and use it in GitHub Desktop.
replace bracketed numbers in strings with options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.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