以前見当をつけていたwildcard.pasはこの件では外れだったようです。
hi_unit\wildcard2.pasの1090付近を以下のようにして、LeadBytesによる処理を追加するとよいようです。
----------------------------
if p^ = ']' then
begin
Break;
end;
if p^ in LeadBytes then
begin
s := s + p^;
Inc(p);
end;
s := s + p^;
Inc(p);
----------------------------