I am trying to highlight parts of an essay that include a list of three or more words, but not the Oxford comma. The regular expression that I came up with is the following:
([a-z]+)(,\s*[a-z]+)(\s*or|and+)(\s*[a-z])
But it does not work. Any thoughts on how to do this?
He must fix "red, white and blue", but not"red, white, and blue"
source
share