This question already has an answer here:
- Regex with replace in Golang 1 answer
I have a file with dates in the format dd.mm.yyyy (e.g. 31.12.2019). I want to transform into format yyyy-mm-dd (e.g. 2019-12-31).
In Notepad++ I can do a Search and Replace with these strings using back references:
Search:
(\d{2}).(\d{2}).(\d{4})
Replace:
\3-\2-\1
How would I do this with Go?
</div>