I have a string defined as follows:
st = "The quick {{brown}} fox jumped over the {{fence}}."
To remove the {{ }}, I am doing the following:
st.gsub(/{{(.*?)}}/, '\1')
=> "The quick brown fox jumped over the fence."
What I would like to do now is put each of the items that matched the regular expression into an array, so that the end result looks like:
arr = []
puts arr => ['brown', 'fence']
puts st => "The quick brown fox jumped over the fence."
Thanks in advance.