code: function getSubredditName(url) {
    try {
      // This will throw a `TypeError: Cannot read property 'Symbol(Symbol.iterator)' of null` if the RegExp fails.
      const [input, name] = new RegExp('^https?://(?:www.)?reddit.com/r/(.*?)/?$').exec(url);
      return name;
    } catch (err) {
      return null;
    }
  }
docs: Extracts a subreddit name from a URL using sketchy RegExp.
  
  @param  {String} url A fully qualified URL.
  @return {String}     The name of a subreddit. For example: "knitting"