The first substitution matches any string, closing square bracket (to skip past the first pair of square brackets), anything, followed by opening square bracket, and removes that. This should remove everything before your string. Then the second substitution replaces from closing square bracket to end of line with nothing.
As a side remark, you should always double quote any variables.