function negateSlash(str) {
  return str.replace(/\[\^([^\]]*?)\]/g, function (match, inner) {
    if (inner.indexOf('/') === -1) {
      inner = '\\/' + inner;
    }

    return '[^' + inner + ']';
  });
}
Negate slashes in exclusion ranges, per glob spec:

```js
negateSlash('[^foo]');
//=> '[^\\/foo]'
```

@param  {String} `str` glob pattern
@return {String}