Improved token replacement by dot-delimited expression