rx_find: Match an expression.

View source: R/rules.R

rx_findR Documentation

Match an expression.

Description

Identify a specific pattern exactly.

Usage

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")

# create expression
x <- rx_find(value = "apples")

grepl(x, "apple")  # should be false
grepl(x, "apples") # should be true


RVerbalExpressions documentation built on May 29, 2024, 6:47 a.m.