I have a string that may have something similar to \1
at the end that I would like to remove.
However I'm running into some problems.
gsub('([\\0-9])', '', 'NY \2', perl = T) ## Looking for "NY". Works fine
## NY
gsub('([\\0-9])', '', 'N Y \2', perl = T) ## Looking for "N Y". Why does this remove the space?
## NY
gsub('([\\0-9])', '', 'N Y \2', perl = F) ## Looking for "N Y". Why does this add \00?
## N Y \002