Regular Expression
RegEx Functions
Action
Function
Search for a substring within a string
grep(substring/value, string)
Replace a single value within a string
sub(pattern, replacement, string)
Replace all instances within a string
gsub(pattern, replacement, string)
Find matches for exact string
grepl(pattern, string)
Inputs:
Outputs:
Resources
DataCamp: Regular Expression
Last updated