Linux regular expression

Hi can someone explain regular expressions to me. I have to use regex's and sed/awk to output the date like this: Today is Wednesday May 9, 2018
Regular expression is a matching rule.

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.

C++ does support some regular expression dialects: http://www.cplusplus.com/reference/regex/


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
Topic archived. No new replies allowed.