diff --git a/packages/nuxt3/src/pages/runtime/utils.ts b/packages/nuxt3/src/pages/runtime/utils.ts index cba7fb0080..c57df35aad 100644 --- a/packages/nuxt3/src/pages/runtime/utils.ts +++ b/packages/nuxt3/src/pages/runtime/utils.ts @@ -6,8 +6,8 @@ export type RouterViewSlotProps = Parameters['$slo const interpolatePath = (route: RouteLocationNormalizedLoaded, match: RouteLocationMatched) => { return match.path - .replace(/(?<=:\w+)\([^)]+\)/g, '') - .replace(/(?<=:\w+)[?+*]/g, '') + .replace(/(:\w+)\([^)]+\)/g, '$1') + .replace(/(:\w+)[?+*]/g, '$1') .replace(/:\w+/g, r => route.params[r.slice(1)]?.toString() || '') }