Suppose we have a string:
string = "123abc456"
Match the template with the matching substring of this string (if there are several matching substrings for a template, find the one closest to the beginning of the string).
Tip: Remember that \d means any digit, . stands for any character, * is used for zero or more occurences, + for one or more, and ? makes the quantifier "lazy".