I have this regex
(?:$|^| )(one|common|word|or|another)(?:$|^| )
which matches fine unless the two words are next to each other.
One one's more word'word common word or another word more another
More and more years to match one or more other strings
And common word things and or
In the above it matches one
in line two but not the or
just next to it. Same for common
and word
int the third line.
Live Example: http://regex101.com/r/hV3wQ3
I believe it's something to do with the non-matching groups' number. But, I am not sure how to achieve the end goal of matching all the list of words without any char around them.
I do not want the one
in one's
or the word in word'word
to be matched.