Format

Regular expressions can also specify the format of the target text. Find the implementation below.

std::regex_replace and std::match_results.format, in combination with capture groups enable us to format text. We can use a format string together with a placeholder to insert the value.

Here are both possibilities:

Get hands-on with 1200+ tech skills courses.