Skip to contents

Remove by Regex

Usage

sf_remove(s, p)

Arguments

s

<character> vector

p

<character> regex pattern

Value

<character> vector

Examples

sf_remove(LETTERS, "A")
#>  [1] ""  "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S"
#> [20] "T" "U" "V" "W" "X" "Y" "Z"

sf_remove(paste0(LETTERS, collapse = ""), "A")
#> [1] "BCDEFGHIJKLMNOPQRSTUVWXYZ"