x <- c("[]kansas(city) Missouri", "percent%slash/",
"\back{squiggle}_under(paren)", "*star-minus+plus")
alphaOnly(x)
alphaOnly(x, also = c(" " = "_", "+" = "_"))
alphaOnly(x, also = c("(" = "[", ")" = "]"))
Run the code above in your browser using DataLab