Learn R Programming

sdtm.oak (version 0.1.0)

months_abb_regex: Regex for months' abbreviations

Description

months_abb_regex() generates a regex that matches month abbreviations. For finer control, the case can be specified with parameter case.

Usage

months_abb_regex(x = month.abb, case = c("any", "upper", "lower", "title"))

Value

A regex as a string.

Arguments

x

A character vector of three-letter month abbreviations. Default is month.abb.

case

A string scalar: "any", if month abbreviations are to be matched in any case; "upper", to match uppercase abbreviations; "lower", to match lowercase; and, "title" to match title case.