Skip to contents
  • is_jmf_project_id(): checks for valid JMF project IDs.

  • jmf_project_id_regex(): returns the underlying regular expression.

Usage

is_jmf_project_id(string, internal = "deny")

jmf_project_id_regex(internal = "deny")

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 as string.

  • jmf_project_id_regex(): a rex() 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"