pathRegExp.md

March 5, 2025 ยท View on GitHub

pathRegExp option

// Use dashes as separators so `/:id-:slug/` isn't translated to `id-:slug` but to `:id`-`:slug`
FlowRouter.pathRegExp = /(:[\w\(\)\\\+\*\.\?\[\]]+)+/g;
  • pathRegExp {RegExp}
  • Default - /(:[\w\(\)\\\+\*\.\?\[\]\-]+)+/g

Use to change the URI RegEx parser used for params, for more info see #25.

Further reading