stringg <- c("You are\ngoing to learn 3 things, the first one is not to extract, and\n2 and 3 are simply digits.", "....", "....",....)
in R Studio I want to find all listitem/strings which ends with a "." and after the dot I want to add a $ sign to it.
grep("\\.$", stringg , value = TRUE) # this gives me the string from list which ends with a dot
with which command can I add the $?
I know I could use str_replace like following but I want to know if I could add instead of replacing it?
str_replace(stringg, "\\.$", ".$")
thanks!