1 person found this helpful
That worked! Thanks!
Seems to me if it's working it's just a coincidence because it won't work for a sentence like:
Red bike, blue bike and yellow bike along with red, green and gold polka dots and blue.
In that case it is going to skip adding a comma after blue bike and add one only after dots.
Nor will it work for:
Red bike, blue bike and yellow bike. Red, green and gold polka dots and blue.
or any paragraph with multiple sentences where there is an "and" in a later sentence. The (.*?) subexpression in this case is actually not doing anything because the (.+) subexpression is skipping right over everything, including multiple "ands" until it reaches the last one in the paragraph.
I'm not sure there is a single expression that will really work in all cases.
You are right, Peter. My editorial team ultimately decided to trash this code because serial commas are too variable, so this code wouldn't work 100% of the time. Thanks all, for the helpful insight.