docs: function tokensToRegExp (tokens, options) {
  	  options = options || {}
  	
  	  var strict = options.strict
  	  var end = options.end !== false
  	  var route = ''
  	  var lastToken = tokens[tokens.length - 1]
  	  var endsWithSlash = typeof lastToken === 'string' && /\/$/.test(lastToken)
  	
  	  // Iterate over the tokens and create our regexp string.
  	  for (var i = 0; i < tokens.length; i++) {
  	    var token = tokens[i]
  	
  	    if (typeof token === 'string') {
  	      route += escapeString(token)
  	    } else {
  	      var prefix = escapeString(token.prefix)
  	      var capture = '(?:' + token.pattern + ')'
  	
  	      if (token.repeat) {
  	        capture += '(?:' + prefix + capture + ')*'
  	      }
  	
  	      if (token.optional) {
  	        if (!token.partial) {
  	          capture = '(?:' + prefix + '(' + capture + '))?'
  	        } else {
  	          capture = prefix + '(' + capture + ')?'
  	        }
  	      } else {
  	        capture = prefix + '(' + capture + ')'
  	      }
  	
  	      route += capture
  	    }
  	  }
  	
  	  // In non-strict mode we allow a slash at the end of match. If the path to
  	  // match already ends with a slash, we remove it for consistency. The slash
  	  // is valid at the end of a path match, not in the middle. This is important
  	  // in non-ending mode, where "/test/" shouldn't match "/test//route".
  	  if (!strict) {
  	    route = (endsWithSlash ? route.slice(0, -2) : route) + '(?:\\/(?=$))?'
  	  }
  	
  	  if (end) {
  	    route += '$'
  	  } else {
  	    // In non-ending mode, we need the capturing groups to match as much as
  	    // possible by using a positive lookahead to the end or next path segment.
  	    route += strict && endsWithSlash ? '' : '(?=\\/|$)'
  	  }
  	
  	  return new RegExp('^' + route, flags(options))
  	}