Encode both: the string and regexp (but skip dummy encodings)