recursive: Make the regular expression recursive.

Description Usage Arguments Value Note References Examples

View source: R/backreferences.R

Description

Makes the regular expression (or part of it) recursive.

Usage

1

Arguments

x

A character vector.

Value

A character vector representing part or all of a regular expression.

Note

Recursion is not supported by R's internal PRCE engine or stringi's ICU engine.

References

http://www.regular-expressions.info/recurse.html and http://www.rexegg.com/regex-recursion.html

Examples

1
2
3
4
5
6
7
8
9
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))

richierocks/rebus.base documentation built on May 27, 2019, 8:47 a.m.