in reply to regex problem

If you know its the only brackets in the file, try:

$data =~ s/[\[\]]//g;

Or, to be safe, if the brackets are always around sbs, try:

$data =~ s/\[(\\sbs)\](.*)/$1$2/;