Googel analytics - I have no idea what they can and cannot do, or in what way you provide the regular expression. This one is without pattern delimiters and lacks options.
((?<!$words)\W)|(\W(?!$words))
This regexp matches when either
1. Anything not in the word list is followed by a non-word character
or
2. When a non-word character is followed by anything not in the word list.
Do note that "anything not in the word list" doesn't mean any word not in the word list. Thus, the above will match two consecutive non-word characters, such as full stop followed by whitespace: ". "
Since I don't know on what kind of strings you operate, I have no idea if this is good enough or if you for example would get one "faulty match" per sentence.