Have you ever done crossword puzzles? "I need a 5 character word that starts with 's' and ends in 'u'."
We could write that as a regular expression and test each word in dictionary with it. That would give a list of words that match that expression and therefore would fit into the puzzle.
If you need to output a date in some format, then you need something else than regex. Command 'date' has its own formatting options. https://linuxconfig.org/date-1-manual-page