int startBracket = message.lastIndexOf('[', endBracket);
if (startBracket == -1) {
startPos = endBracket+1;
} else {
String name = message.substring(startBracket+1, endBracket);
SimpleData value = getDataContext().getSimpleValue(name);
String replacement = formatData(name, value);
message = message.substring(0, startBracket) + replacement
+ message.substring(endBracket + 1);
startPos = startBracket + replacement.length();
}