Update: As per comments regarding the ambiguity of my question, I\'ve increased the detail in the question.
(Terminology: by words I am refering to
/('\w+)|(\w+'\w+)|(\w+')|(\w+)/