Let's see how to replace multiple tokens in string. As an example problem to solve we will use this string:The quick <color_1> <animal_1> jumps over the lazy <animal_2> String extension for replacing tokens Token's format is < text _ numbers > what can be turned into regular expression: <[:alpha:]+_{1}[:digit:]+>. We'll extend string and add a …