| regex_must_match | R Documentation |
Attach a standardized error message to a regex argument. By default, the
message will be "must match the regex pattern {regex}". If the input
regex has a negate attribute set to TRUE, the message will instead be
"must not match...". This message can be used with stabilize_chr() and
stabilize_chr_scalar().
regex_must_match(regex)
regex |
|
The regex value with names() equal to the generated error
message.
regex_must_match("[aeiou]")
# With negation:
regex <- "[aeiou]"
attr(regex, "negate") <- TRUE
regex_must_match(regex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.