Learn R Programming

rebus.base (version 0.0-3)

modify_mode: Apply mode modifiers

Description

Applies one or more mode modifiers to the regular expression.

Usage

modify_mode(x, modes = c("i", "x", "s", "m", "J", "X"))

case_insensitive(x)

free_spacing(x)

single_line(x)

multi_line(x)

duplicate_group_names(x)

no_backslash_escaping(x)

Arguments

x
A character vector.
modes
A character vector of mode modifiers.

Value

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

References

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

Examples

Run this code
x <- "foo"
case_insensitive(x)
free_spacing(x)
single_line(x)
multi_line(x)
duplicate_group_names(x)
no_backslash_escaping(x)
modify_mode(x, c("i", "J", "X"))

Run the code above in your browser using DataLab