refactor(endpoint) adding a match methods to avoid manipulating too much the regexp