code: function $re(tok) {
          if (i > currentPos) {
              current = current.slice(i - currentPos);
              currentPos = i;
          }
          var m = tok.exec(current);
          if (!m) {
              return null;
          }
  
          skipWhitespace(m[0].length);
          if(typeof m === "string") {
              return m;
          }
  
          return m.length === 1 ? m[0] : m;
      }
docs: Specialization of $(tok)