In this tutorial, we will learn about gsub() function in R to replace all matching patterns in a string. gsub, stands for “global substitution” is similar to another function R, sub(), but for substituting all matching patterns, not just the first one. Here is a typical use of gsub() in R. We need to provide… Continue reading gsub() in R to replace all matching patterns