31. Transforming dates in strings

Write a function that, given a text containing dates in the format dd.mm.yyyy or dd-mm-yyyy, transforms the text so that it contains dates in the format yyyy-mm-dd.

Get The Modern C++ Challenge now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.