What regexpr flavour is used in writes?

There are so many different version. This needs to be mentioned in the documentation.

It seems that character classes like ^[a-z_]+.html$ do not work.

Caddy’s rewrite module accepts the regex format that Go uses. You can learn more about that on the official documentation.

Specifically, Caddy accepts the format used by RE2. RE2’s regex format is documented here.

It seems your regex is accepted by Go, so there’s probably another issue lurking. Could you post your Caddyfile and the version of Caddy you are using?

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.