Specify a handler that will be called for a matching HTTP GET
@param regex A regular expression
@param handler The handler to call
432589
public RouteMatcher getWithRegEx(String regex, Handler<HttpServerRequest> handler) {
		addRegEx(regex, handler, getBindings);
		return this;
	}
741797
public RouteMatcher trace(String pattern, Handler<HttpServerRequest> handler) {
		addPattern(pattern, handler, traceBindings);
		return this;
	}
64072
public RouteMatcher optionsWithRegEx(String regex, Handler<HttpServerRequest> handler) {
		addRegEx(regex, handler, optionsBindings);
		return this;
	}
140078
public static void parse(final String str, final ShortcodeParser.Handler handler) {
      ShortcodeParser.parse(str, handler);
   }
239320
def handler_for(rjr_method)
    # look for exact match first
    handler = @handlers.find { |k,v| k == rjr_method }

    # if not found try to match regex's
    handler ||= @handlers.find { |k,v| k.is_a?(Regexp) && (k =~ rjr_method) }

    handler.nil? ? nil : handler.last
  end
1194427
public Router connect(@NotNull final Pattern regex, @NotNull final IMiddleware... handlers) {
        addRegEx("CONNECT", regex, handlers, connectBindings);
        return this;
    }
542413
@Advice.OnMethodExit
	public static void afterGetHandler(@Advice.Return Object handler) {
		SpringMvcRequestNameDeterminerTransformer.setRequestNameByHandler(handler);
	}
442469
public void deleteToken(String token, DeleteTokenHandler handler) {
        HMSAgentLog.i("deleteToken:token:" + StrUtils.objDesc(token) + " handler=" + StrUtils.objDesc(handler));
        this.token = token;
        this.handler = handler;
        connect();
    }
1293665
public RouteMatcher connectWithRegEx(String regex, Handler<HttpServerRequest> handler) {
		addRegEx(regex, handler, connectBindings);
		return this;
	}
131506
public Router get(@NotNull final Pattern regex, @NotNull final IMiddleware... handlers) {
        addRegEx("GET", regex, handlers, getBindings);
        return this;
    }
221380
public Router patch(@NotNull final Pattern regex, @NotNull final IMiddleware... handlers) {
        addRegEx("PATCH", regex, handlers, patchBindings);
        return this;
    }
644138
function(url) {
            if (url == null) return this;
            if (url.length > 0 && url[0] == "/") {
                url = url.replace("/", "");
            }
            var matched = _.any(this.handlers, function(handler) {
                if (handler.route.test(url)) {
                    handler.callback(url);
                    return true;
                }
                return false;
            });
            logging.log("handle state ", url, matched != null);
            return matched;
        }
523374
def match_url(self, path, method='GET'):
        
        path = path.strip().lstrip('/')
        handler, param = self.routes.match(method + ';' + path)
        if handler: return handler, param
        if method == 'HEAD':
            handler, param = self.routes.match('GET;' + path)
            if handler: return handler, param
        handler, param = self.routes.match('ANY;' + path)
        if handler: return handler, param
        return None, {}
1238297
public function unregisterActionHandler($handlertype, $regexhandler,
        $object, $methodname = ''
    ) {
        // precheck
        if (!($handlertype & SMARTIRC_TYPE_ALL)) {
            $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: passed invalid handler'
                .'type to unregisterActionHandler()', __FILE__, __LINE__
            );
            return false;
        }

        if (!empty($methodname)) {
            $object = array($object, $methodname);
        }

        foreach ($this->_actionhandler as $i => &$handlerinfo) {
            if ($handlerinfo['type'] == $handlertype
                && $handlerinfo['message'] == $regexhandler
                && $handlerinfo['callback'] == $object
            ) {
                $id = $handlerinfo['id'];
                unset($this->_actionhandler[$i]);

                $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: '
                    .'actionhandler('.$id.') unregistered', __FILE__, __LINE__
                );
                $this->_actionhandler = array_values($this->_actionhandler);
                return $this;
            }
        }

        $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: could '
            .'not find actionhandler type: "'.$handlertype.'" message: "'
            .$regexhandler.'" matching callback. Nothing unregistered', __FILE__, __LINE__
        );
        return false;
    }
700567
public static final KeyPressHandler getRegExKeyPressHandler(final String pregEx) {
    if (StringUtils.isEmpty(pregEx)) {
      return null;
    }
    RegExKeyPressHandler result = HandlerFactory.REG_EX_KEY_PRESS_HANDLER_MAP.get(pregEx);
    if (result == null) {
      result = new RegExKeyPressHandler(pregEx);
    }
    return result;
  }
403372
function paramsParser(url, rule) {
    var matches = rule.regexp.exec(url).slice(1);
    var keys = rule.keys;
    var params = {};

    for (var i = 0; i < keys.length; i++) {
      params[keys[i]] = matches[i];
    }

    return params;
  }
226190
function(req) {
        var args = utils.arg2arr(arguments), index = -1;
        var allHandlers = this._handlers.concat(this._lastHandlers);
        var next = function(error) {
            var item = allHandlers[++index];
            if (item) {
                var matched = false;
                if (utils.isString(item.routeExp)) {
                    matched = req.url.indexOf(item.routeExp) === 0;
                } else if (utils.type(item.routeExp) === 'regexp') {
                    matched = item.routeExp.test(parse(req.url).pathname);
                }
                //
                if (matched) {
                    var clone = args.concat();
                    if (error) { clone.push(error); }
                    item.handler.apply(null, clone);
                }
            }
        };
        args.push(next);
        next();
    }