To clarify your mistake, the 
brackets in regular expressions constitute a list of individual characters
that can be matched at that location. On its own the whole bracket expression matches only a single character on the line.
sed 's/^[lLbB]oobar/Foobar/g' infile
This will match any line starting with "loobar
", or "Boobar
", and change that string to "Foobar
". But it will not
" or any other multi-character combination.
will match the first "d
", the first "c
the first "=
" on the line (whichever is encountered first), and remove it. It will not
match the whole string"dc=
", although it could match one of the individual characters, if it's the first instance on the line.
I say only the first, because you need to add the "g
" option at the end of the s///
command to do multiple substitutions on a single line.
I suggest you take some time to really learn how to use regular expressions. You'll be glad you did. Here are a couple of tutorials:
And more about using sed here: