regexp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: 0BSD Imports: 0 Imported by: ? 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 Match

func Match(pattern string, b []byte) (matched bool, err error)

func MatchString

func MatchString(pattern string, s string) (matched bool, err error)

func QuoteMeta

func QuoteMeta(s string) string

Types

type Regexp

type Regexp struct {
	// contains filtered or unexported fields
}

func Compile

func Compile(expr string) (*Regexp, error)

func CompilePOSIX

func CompilePOSIX(expr string) (*Regexp, error)

func MustCompile

func MustCompile(str string) *Regexp

func MustCompilePOSIX

func MustCompilePOSIX(str string) *Regexp

func (*Regexp) AppendText

func (*Regexp) AppendText(b []byte) ([]byte, error)

func (*Regexp) Copy

func (*Regexp) Copy() *Regexp

func (*Regexp) Expand

func (*Regexp) Expand(dst []byte, template []byte, src []byte, match []int) []byte

func (*Regexp) ExpandString

func (*Regexp) ExpandString(dst []byte, template string, src string, match []int) []byte

func (*Regexp) Find

func (*Regexp) Find(b []byte) []byte

func (*Regexp) FindAll

func (*Regexp) FindAll(b []byte, n int) [][]byte

func (*Regexp) FindAllIndex

func (*Regexp) FindAllIndex(b []byte, n int) [][]int

func (*Regexp) FindAllString

func (*Regexp) FindAllString(s string, n int) []string

func (*Regexp) FindAllStringIndex

func (*Regexp) FindAllStringIndex(s string, n int) [][]int

func (*Regexp) FindAllStringSubmatch

func (*Regexp) FindAllStringSubmatch(s string, n int) [][]string

func (*Regexp) FindAllStringSubmatchIndex

func (*Regexp) FindAllStringSubmatchIndex(s string, n int) [][]int

func (*Regexp) FindAllSubmatch

func (*Regexp) FindAllSubmatch(b []byte, n int) [][][]byte

func (*Regexp) FindAllSubmatchIndex

func (*Regexp) FindAllSubmatchIndex(b []byte, n int) [][]int

func (*Regexp) FindIndex

func (*Regexp) FindIndex(b []byte) (m []int)

func (*Regexp) FindString

func (*Regexp) FindString(s string) string

func (*Regexp) FindStringIndex

func (*Regexp) FindStringIndex(s string) (m []int)

func (*Regexp) FindStringSubmatch

func (*Regexp) FindStringSubmatch(s string) []string

func (*Regexp) FindStringSubmatchIndex

func (*Regexp) FindStringSubmatchIndex(s string) []int

func (*Regexp) FindSubmatch

func (*Regexp) FindSubmatch(b []byte) [][]byte

func (*Regexp) FindSubmatchIndex

func (*Regexp) FindSubmatchIndex(b []byte) []int

func (*Regexp) LiteralPrefix

func (*Regexp) LiteralPrefix() (prefix string, complete bool)

func (*Regexp) Longest

func (*Regexp) Longest()

func (*Regexp) MarshalText

func (*Regexp) MarshalText() ([]byte, error)

func (*Regexp) Match

func (*Regexp) Match(b []byte) bool

func (*Regexp) MatchString

func (*Regexp) MatchString(s string) bool

func (*Regexp) NumSubexp

func (*Regexp) NumSubexp() int

func (*Regexp) ReplaceAll

func (*Regexp) ReplaceAll(src []byte, repl []byte) []byte

func (*Regexp) ReplaceAllFunc

func (*Regexp) ReplaceAllFunc(src []byte, repl func([]byte) []byte) []byte

func (*Regexp) ReplaceAllLiteral

func (*Regexp) ReplaceAllLiteral(src []byte, repl []byte) []byte

func (*Regexp) ReplaceAllLiteralString

func (*Regexp) ReplaceAllLiteralString(src string, repl string) string

func (*Regexp) ReplaceAllString

func (*Regexp) ReplaceAllString(src string, repl string) string

func (*Regexp) ReplaceAllStringFunc

func (*Regexp) ReplaceAllStringFunc(src string, repl func(string) string) string

func (*Regexp) Split

func (*Regexp) Split(s string, n int) []string

func (*Regexp) String

func (*Regexp) String() string

func (*Regexp) SubexpIndex

func (*Regexp) SubexpIndex(name string) int

func (*Regexp) SubexpNames

func (*Regexp) SubexpNames() []string

func (*Regexp) UnmarshalText

func (*Regexp) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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