do {
        match = (/<\w+-.+?>|<\w+>|./).exec(text);
        if(match === null)break;
        key = match[0];
        text = text.substring(match.index + key.length);