word_sub: allow arbitrary-length string changes