in reply to
Re: Efficient selective substitution on list of words
in thread Efficient selective substitution on list of words
I really do appreciate your suggestions, and while it may be more detailed overall, the charm of tye's solution was that he basically prepared the entire substitution list in a single line of code, using map, sort, and join with some interesting syntax and I was wanting to learn how it worked for the beauty of learning as much as for the joy of having a working solution.
In the sort process, I remember he ordered the words by length so that the substitutions would start with the longest words and work down to the shorter ones. This would avoid several potential problems with overlapping terms in the exchange list, and is almost a necessity, I think, to proper function here.