Replace matched patterns in a string

x %reall% y.z

Arguments

x

A character vector

y.z

A vector of two string specifying pattern for match and replace

Value

A character vector

Details

This function is a pipe version of stringr::str_replace_all

Examples

'totoro12_13' %reall% c('[0-9]+', 'to')
#> [1] "totoroto_to"