# OPs original case.
echo 'there there are are multiple lexical errors in this line line' | sed  's/\([a-z]\+[ ,\n]\+\)\1/\1/g'

# Now add a space after 'line'
echo 'there there are are multiple lexical errors in this line line ' | sed  's/\([a-z]\+[ ,\n]\+\)\1/\1/g'

# To fix the original case..move the word separator outside the capture group
echo 'there there are are multiple lexical errors in this line line' | sed -e 's/\([a-z]\+\)[ ,\n]\1/\1/g'
# THAT ALONE DOES NOT WORK!!!

# Add a word boundary requirement.
echo 'there there are are multiple lexical errors in this line line' | sed -e 's/\b\([a-z]\+\)[ ,\n]\1/\1/g'
# THAT WORKS!!!
