Get/Set Regex Chunks From a regexr Object

Usage

regex(x, ...)
regex(x) <- value

Arguments

x
A regexr object.
value
The comment(s) to assign.
...
Ignored.

Get/Set Regex Chunks From a regexr Object

Value

regex - Returns a list of regexes.

Description

regex - Get the regex chunks from a regexr object.

regex<- - Set the regex chunk(s) of a regexr object.

Examples

minimal <- construct("a", "b", "c") minimal
[1] "abc"
regex(minimal)
[[1]] [1] "a" [[2]] [1] "b" [[3]] [1] "c"
regex(minimal)[2] <- "\\s+[A-Z]|[0-9]" regex(minimal)
[[1]] [1] "a" [[2]] [1] "\\s+[A-Z]|[0-9]" [[3]] [1] "c"