This expression is almost identical to anything() with one major exception, a + is used instead of a *. This means something() expects something whereas anything() expects anything including... nothing!

something(.data = NULL)

Arguments

.data

Expression to append, typically pulled from the pipe %>%

References

Metacharacters: https://www.regular-expressions.info/characters.html#special

Examples

something()
#> [1] "(?:.+)"
# construct an expression x <- something() grepl(x, "something!") # this should be true
#> [1] TRUE
grepl(x, "") # this should be false
#> [1] FALSE
grepl(anything(), "") # this should be true
#> [1] TRUE