rx_something | R Documentation |
This expression is almost identical to rx_anything()
with one major exception, a +
is used instead of a *
. This
means rx_something()
expects something whereas
anything()
expects anything including... nothing!
rx_something(.data = NULL, mode = "greedy")
.data |
Expression to append, typically pulled from the pipe |
mode |
Matching mode ( |
Metacharacters: https://www.regular-expressions.info/characters.html#special
Greedy and Lazy Quantifiers: https://www.regular-expressions.info/repeat.html#greedy
rx_something()
# construct an expression
x <- rx_something()
grepl(x, "something!") # this should be true
grepl(x, "") # this should be false
grepl(rx_anything(), "") # this should be true
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.