pyre

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 6 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(pattern string) (*regexp2.Regexp, error)

Compiles a Python re pattern with Python matching semantics on the regexp2 engine

func CompileFullmatch

func CompileFullmatch(pattern string) (*regexp2.Regexp, error)

Compiles a Python re pattern whose MatchString answers re.fullmatch over the whole subject

func CompileIgnoreCase

func CompileIgnoreCase(pattern string) (*regexp2.Regexp, error)

Compiles a Python re pattern under re.IGNORECASE with Python matching semantics

func GroupIndex

func GroupIndex(pattern string) (map[string]int, error)

Python groupindex of a pattern, each group name mapped to its group number in the translation

func MustCompile

func MustCompile(pattern string) *regexp2.Regexp

Compiled pattern with Python semantics, panicking on a pattern Python rejects

func Translate

func Translate(pattern string) (string, error)

Translates a Python re pattern into regexp2 syntax, failing where re.compile fails

Types

type Error

type Error struct {
	Msg     string
	Pattern string
	Pos     int
	HasPos  bool
}

Error is re.error with the CPython message and code point position

func (*Error) Error

func (e *Error) Error() string

Message as str(re.error) renders it, with line and column when the pattern spans lines

type OverflowError

type OverflowError struct{ Msg string }

OverflowError is the OverflowError re.compile raises for a repeat count at or above MAXREPEAT

func (*OverflowError) Error

func (e *OverflowError) Error() string

Jump to

Keyboard shortcuts

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