rx_end_of_line(enable = TRUE)
rx_end_of_line(enable = FALSE)
rx_end_of_line("abc", enable = TRUE)
# create expression
x <- rx() %>%
rx_start_of_line(FALSE) %>%
rx_find("apple") %>%
rx_end_of_line()
grepl(x, "apples") # should be false
grepl(x, "apple") # should be true
Run the code above in your browser using DataLab