2021 | OriginalPaper | Chapter
8. Elements of Regular Expressions
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
Abstract
string1 <- "This is elementary Watson. 1+1=2"
my.regex <- "1\\+1=2"
my.regex.replacement.value <- "two plus two equals four "
sub(pattern = my.regex,replacement =
my.regex.replacement.value,x = string1)
## [1] "This is elementary Watson. two plus two equals four "