Is it possible to use a regular expression to match all words but match unique words only once? I am aware there are other ways of doing this however I\'m interested
Pretty close, just readd the \b in the negative lookahead
\b
/(\w+\b)(?!.*\1\b)/
See it on Rubular