function stack0SymbolRecognizer(data, startSymbol, endSymbol, keepSymbol = false) {
    return new Promise(resolve => {
        try {
            let stack = 0;
            let rec = 0;
            let strVect = [];

            if (!endSymbol && startSymbol === '[') {
                endSymbol = ']';
            } else if (!endSymbol && startSymbol === '{') {
                endSymbol = '}';
            } else if (!endSymbol && startSymbol === '(') {
                endSymbol = ')';
            }

            for (let idx = 0; idx < data.length; ++idx) {
                let c = data[idx];

                if (rec == 0 && c == startSymbol) rec = 1;
                if (c == startSymbol && rec == 1) stack += 1;
                if (c == endSymbol && rec == 1) stack -= 1;
                if (stack == 0 && rec == 1) rec = 2;

                if (rec == 1) strVect.push(c);

                if ((idx === data.length - 1 && rec == 1) || (idx === data.length - 1 && rec == 0)) return resolve(null);

                if (idx === data.length - 1 || rec == 2) {
                    strVect = strVect.join('');
                    if (keepSymbol) {
                        return resolve(startSymbol + strVect.slice(1) + endSymbol);
                    }
                    return resolve(strVect.slice(1));
                }
            }
        } catch (err) {
            if (keepSymbol) {
                return resolve(startSymbol + endSymbol);
            }
            return resolve('');
        }
    });
}
Get first substring between two characters (startSymbol and endSymbol)
@param {string} data file content.
@param {string} startSymbol
@param {string} endSymbol