In reply to Mike Zdeb. Hi Mike, Thank you for this catch. I meant to use SUB within the expression NEW_STR = transtrn(STR,SUB,trimn('')); instead of hard-coded NEW_STR = transtrn(STR,' ',trimn('')); I have corrected this in the blog.