grapes-s-grapes: Perl style infix substitution function

Description Usage Arguments Examples

Description

This function allows the substitution syntax to mimic perl's very closely. As in perl the first character is used as a delimiter to separate the regular expression and options. Paired delimiters are supported as in perl, so both '/this/' and 'this' are both supported for instance.

Usage

1

Arguments

pattern

a character delimited regular expression pattern like those in perl

data

character vector to substitute

Examples

1
2
3
string = c('this is a Test', 'string')
string %s% '/this/that/'
string %s% '{is}{at}g'

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