Build, test, and debug regular expressions
Matches CMS preview API URLs that begin with a locale code (two letters, hyphen, two letters, e.g. en-us or de-DE) followed by /cms/api/preview and a path segment of letters, digits, hyphens, underscores, equals, or slashes. It then uses PCRE conditional subpatterns ((?(3)...)) to optionally capture query-string components (parameter characters, question marks, and further parameters) only if the lazy wildcard group participated in the match. Intended for Kubernetes Nginx Ingress path routing to direct locale-prefixed headless CMS preview requests to the correct backend service.