I have a variable a = "ver version"
and v = "version"
. Now I want to replace 'ver'
with 'version'
using gsub
.
Using gsub(v, "version", a)
output is "version versionsion"
I want it to be "version version"
. To replace exact string, I use "\\bpattern\\b"
gsub("\\bv\\b","version,a)
It says unexpected input. Can someone suggest the correct syntax for the same?