View Problem

Replace all regex matches in a string with a dynamic string

Transform "The {Quick} Brown {Fox}" into "The kciuQ Brown xoF" by reversing words in braces using the regex /\{(\w+)\}/.
ExpandDiskEdit
groovy
replaced = "The {Quick} Brown {Fox}".replaceAll(/\{(\w+)\}/, { full, word -> word.reverse() } )

Submit a new solution for groovy
There are 14 other solutions in additional languages (clojure, cpp, erlang, fantom ...)