code: function preparePatternStringSegment(str) {
      if (STRING_TESTS.ARRAY.test(str)) {
          const els = str.replace(/([^\\]),/g, "$1$1,")
                         .split(/[^\\],/);
          return arrayToORRegExpStr(els.map(_transformSegment))
      } else {
          return _transformSegment(str);
      }
  }
docs: Prepare string to be passed through RegExp constructor while transforming
  glob patterns.