Regex for matching all words between a set of curly braces
You're close, but using the wrong method:
sentence = "hello {name} is {thing}"
sentence.scan(/\{(.*?)\}/)
# => [["name"], ["thing"]]
You're close, but using the wrong method:
sentence = "hello {name} is {thing}"
sentence.scan(/\{(.*?)\}/)
# => [["name"], ["thing"]]