For example, if want to change 'lNDISTINCT CHATTERING' to 'INDISTINCT CHATTERING', we may try this:
sed "s/l([A-Z])/I\1/" file.txt
which will produce the error:
"sed: -e expression #1, char 15: invalid reference \1 on `s' command's RHS"
This is because the parenthesis must be escaped thus:
sed "s/l\([A-Z]\)/I\1/" file.txt