R/regex.R

Defines functions complete_regex interval_regex time_regex

time_regex <- function() {
  "(0|1|2){0,1}\\d:(0|3)0"
}

interval_regex <- function() {
  str_c(time_regex(), "-", time_regex())
}

complete_regex <- function(x) {
  str_c("^", x, "$")
}
poissonconsulting/openinghours documentation built on July 28, 2020, 4:36 p.m.