Control whether to match the expression only if it appears from the beginning of the line.

start_of_line(enable = TRUE)

Arguments

enable

Whether to enable this behavior, defaults to TRUE

Examples

start_of_line(enable = TRUE)
#> [1] "^"
start_of_line(enable = FALSE) # create expression x <- start_of_line() %>% then("apple") grepl(x, "pineapple") # should be false
#> [1] FALSE
grepl(x, "apple") # should be true
#> [1] TRUE