I have a string and would like to check whether it contains a date in a given date format, e.g. "%Y-%m-%d", with format as for format-time-string
. This is for a package and users can configure the date format freely. So I cannot just hard-code a regular expression.