public RouteBuilder regex(Pattern regex) {
        return pathMapping(new RegexPathMapping(regex));
    }
Sets the {@link Route} to match the specified {@code regex}. It also extracts
the values of the named groups to {@linkplain ServiceRequestContext#pathParams() pathParams}:
e.g. {@code "^/users/(?<userId>[0-9]+)$"} will extract the second numeric part of the path into
the {@code "userId"} path parameter.
core/src/main/java/com/linecorp/armeria/server/RouteBuilder.java