is_jmf_project_id(): checks for valid JMF project IDs.jmf_project_id_regex(): returns the underlying regular expression.
Arguments
- string
Input vector passed to
str_detect().- internal
"allow"or"deny"internal IDs.
Value
is_jmf_project_id(): a logical vector the same length asstring.jmf_project_id_regex(): arex()regular expression.
Examples
# valid JMF project ID:
is_jmf_project_id("JMF-2401-42")
#> [1] TRUE
# this is a JMF sample ID:
is_jmf_project_id("JMF-2401-42-0001")
#> [1] FALSE
# extract JMF project ID from text:
stringr::str_extract(
"my sample id is JMF-2401-42-0001",
jmf_project_id_regex()
)
#> [1] "JMF-2401-42"