dttm_fmt_to_regex()
takes a tibble of parsed
date/time format components (as returned by parse_dttm_fmt()
), and a
mapping of date/time component formats to regexps and generates a single
regular expression with groups for matching each of the date/time components.
dttm_fmt_to_regex(
fmt,
fmt_regex = fmt_rg(),
fmt_c = fmt_cmp(),
anchored = TRUE
)
A string containing a regular expression for matching date/time components according to a format.
A format string (scalar) to be parsed by patterns
.
A named character vector of regexps, one for each date/time component.
Whether the final regex should be anchored, i.e. bounded by
"^"
and "$"
for a whole match.