I think you're right, but you may be able to do it with gregexpr, regmatches and lapply. I found this, and modified for your use it would be someting like:
x <- "This is a sentence with /AString/content/BString/and/AString/otherstuff/BString/ in it"
gsubf <- function(pattern, x) {
m <- gregexpr(pattern, x)
regmatches(x, m) <- lapply(regmatches(x, m), gsub, pattern=" ", replacement="")
x
}
gsubf(x)
Of course, this only works if there are no spaces in /Astring/ and /Bstring/, then you would have to use capture groups