I usually end up with a lot of conditions and/or loops to parse a regex and interpolate values back into its capture groups, and am looking for experienced answers to solve this problem in hopefully a simple manner. I usually end up with a lot of conditions and/o