s: Substitution function using perl compatible regular...

Description Usage Arguments See Also Examples

Description

Substitution function using perl compatible regular expressions

Usage

1
s(data, pattern, replacement, options = "")

Arguments

data

character vector to substitute

pattern

regular expression to match

replacement

replacement text to use

options

option flags

See Also

regex Section 'Perl-like Regular Expressions' for a discussion of the supported options

Examples

1
2
3
string = c('this is a Test', 'string')
s(string, 'test', 'not a test', 'i')
s(string, 'i', 'x', 'g')

jimhester/perlrer documentation built on May 19, 2019, 10:33 a.m.