diff --git a/src/Controller.ts b/src/Controller.ts index bed86e3..e5b587e 100644 --- a/src/Controller.ts +++ b/src/Controller.ts @@ -15,7 +15,7 @@ export default abstract class Controller { path = path.replace(/:[a-zA-Z_-]+\??/g, '' + params); } else if (Array.isArray(params)) { let i = 0; - for (const match of path.matchAll(/:[a-zA-Z_-]+\??/g)) { + for (const match of path.matchAll(/:[a-zA-Z_-]+(\(.*\))?\??/g)) { if (match.length > 0) { path = path.replace(match[0], typeof params[i] !== 'undefined' ? params[i] : ''); }