Why do we need ".\" in Regex substitution s/.\{1}$// -


this expression delete last character in line.

the grouping not .\ \{. that's how syntax is. tells reggex engine { supposed treated special character.

otherwise try match character { literally.


however, whole {1} unnecessary because . implies matching single character.