R uses seven regular expression functions for pattern matching and replacement. If you know how to use these functions with appropriate regular expression patterns, then you have a worthy and efficient toolkit for most data science applications.
Let’s look at code using each function.
9.1 grep
9.1.1 Pattern Matching and Replacement
grep: a RegEx pattern which matches string vectors. If “value = TRUE” is specified, matching characters are returned. In other words, if the input = “aabbcc” and the pattern is “aa”, the output will be ...