Update: This question is a near duplicate of this
I\'m sure the answer to my question is out there, but I couldn\'t find the words to express it suc
Try something like input.replace(regex, "$1") to get the results of your capture group.
input.replace(regex, "$1")