Identify a specific pattern exactly.

rx_find(.data = NULL, value)

Arguments

.data

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

value

Exact expression to match

References

Capturing group: https://www.regular-expressions.info/brackets.html

Stack Overflow: https://stackoverflow.com/questions/3512471

Examples

rx_find(value = "apple")
#> [1] "(apple)"
# create expression x <- rx_find(value = "apples") grepl(x, "apple") # should be false
#> [1] FALSE
grepl(x, "apples") # should be true
#> [1] TRUE