pcre

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pcre writes a route's pattern, which the reader checks with Go's regexp and Envoy runs with RE2, as PCRE2 reads it in the byte mode nginx compiles its regular expressions in: from Go's own parse of the pattern, so PCRE2 is never handed RE2 text it reads another way ({,3}, { 2 } and \v are text or other characters in RE2 and repetitions or vertical space in PCRE2, and \Q with no \E would quote the text written after the pattern).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(pattern string) (string, error)

Write returns PCRE2 text that takes exactly the paths of ASCII characters the pattern takes, the only paths Envoy matches a pattern against: Envoy refuses a byte above 0x7F in an HTTP/1.1 path and escapes it in an HTTP/2 one, and matches the path with every such escape kept (measured on Envoy 1.40.2). A character outside ASCII written in the pattern therefore matches nothing, and a class takes a byte above 0x7F only when it takes every character outside ASCII, as [^/] and . do; nginx meets such a byte only decoded from an escape, the difference its declaration names. Its error is an operation of Go's parse this writer does not know: a bug in proxyfile, because the reader has compiled the same pattern.

Types

This section is empty.

Jump to

Keyboard shortcuts

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