I want to delete lines that contain a certain string, for example "Cola", but only if the line matches exactly and has the same number of characters. In other words, don't delete lines with the word "Cola" inside but that are larger.
sed '/^Cola$/d' < input
grep -Fxv Cola < input
awk '$0 != "Cola"' < input
This the way to delete a line containing and only containing the string "Cola":
cat somefile.txt | sed '/^Cola$/d' > newfile.txt