Help us shape the future of Go! Take the 2026 Go Developer Survey

regex

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathExactRegex added in v1.9.0

func PathExactRegex(path string) string

PathExactRegex creates a regex pattern that matches an exact path while also allowing query strings, fragments, and semicolon-separated parameters that may appear in the :path pseudo-header.

func PathSeparatedPrefixRegex added in v1.6.0

func PathSeparatedPrefixRegex(prefix string) string

PathSeparatedPrefixRegex creates a regex pattern that Envoy's PathSeparatedPrefix behavior. The pattern matches paths that either exactly match the prefix or have the prefix followed by "/". This ensures proper path separation (e.g., "/api" matches "/api" and "/api/v1" but not "/apiv1").

References: - Envoy 'path_separated_prefix' : https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routematch

func Validate

func Validate(regex string) error

Validate validates a regex string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL