Make the regular expression recursive.
Makes the regular expression (or part of it) recursive.
recursive(x)
x |
A character vector. |
A character vector representing part or all of a regular expression.
Recursion is not supported by R's internal PRCE engine or
stringi
's ICU engine.
recursive("a") # Recursion isn't supported by R's PRCE engine or # stringi/stringr's ICU engine x <- c("ab222z", "ababz", "ab", "abab") rx <- "ab(?R)?z" grepl(rx, x, perl = TRUE) try(grepl(rx, x)) try(stringi::stri_detect_regex(x, rx))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.