Subject: bug#39978: Weird substitution of square brackets

From: Evangelos Tsagkas <[email-masked]>
Date: Sat, 7 Mar 2020 22:17:28 +0200

$ echo "object[0])" | sed 's/[\]\[]/./g'
object[0])
$ echo "object[0])" | sed 's/[\]]/./g'
object[0])
$ echo "object[0])" | sed 's/[\[]/./g'
object.0])
$ echo "object[])" | sed 's/[\]\[]/./g'
object[])
$ echo "object[])" | sed 's/[\[\]]/./g'
object.)