This alias removes words closer to the beginning of the string if they already exist as words further on:

Code:
remrpts var %i | return $(,,$regsub($1,/(?:^| )([^ ]+)(?= )(?=.* \1(?: |$))/gs,,%i)) %i