tr <- "a ab abc B BB BBB f"
tr <- gsub(" *\\b[[:alpha:]]{1,2}\\b *", " ", tr) # Remove 1-2 letter words
gsub("^ +| +$|( ) +", "\\1", tr) # Remove excessive spacing
dHIgPC0gImEgYWIgYWJjIEIgQkIgQkJCIGYiCnRyIDwtIGdzdWIoIiAqXFxiW1s6YWxwaGE6XV17MSwyfVxcYiAqIiwgIiAiLCB0cikgIyBSZW1vdmUgMS0yIGxldHRlciB3b3Jkcwpnc3ViKCJeICt8ICskfCggKSArIiwgIlxcMSIsIHRyKSAjIFJlbW92ZSBleGNlc3NpdmUgc3BhY2luZwo=