is.regex | R Documentation |
Acts as a logical test of a regular expression's validity. is.regex
uses gsub
and tests for errors to determine a regular
expression's validity. The regular expression must conform to R's regular
expression rules (see ?regex
for details about how R handles regular
expressions).
is.regex(pattern)
pattern |
A regular expression to be tested. |
Returns a logical (TRUE
is a valid regular expression).
gsub
is.regex("I|***")
is.regex("I|i")
sapply(regex_usa, is.regex)
sapply(regex_supplement, is.regex) ## `version` is not a valid regex
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.