I am trying to match two URLs, one with placeholders and one with filled placeholders in Angular with TypeScript. For Example URL before the placeholders are filled: http://this/is/{placeholder1}/{placeholder2}/my/url?limit=10&offset=5 URL after the placeholders are filled: http://this/is/100Banana/200Apple/my/url?limit=10&offset=5 The target is to match those two URLs with Regex and get a match. One of the problems is, that the placeholders could be filled with anything a URL allows. The first attemp was to replace the placeholders with Regex like [^/]+ before the Regex match. But that only works if the placeholders were at the end of the URL. Continue reading...