package regexp

import "github.com/containers/storage/pkg/regexp"

Index

Types

type Regexp

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

Regexp is a wrapper struct used for wrapping MustCompile regex expressions used as global variables. Using this structure helps speed the startup time of apps that want to use global regex variables. This library initializes them on first use as opposed to the start of the executable.

func Delayed

func Delayed(val string) Regexp

func (Regexp) Expand

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

func (Regexp) ExpandString

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

func (Regexp) Find

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

func (Regexp) FindAll

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

func (Regexp) FindAllIndex

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

func (Regexp) FindAllString

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

func (Regexp) FindAllStringIndex

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

func (Regexp) FindAllStringSubmatch

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

func (Regexp) FindAllStringSubmatchIndex

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

func (Regexp) FindAllSubmatch

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

func (Regexp) FindAllSubmatchIndex

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

func (Regexp) FindIndex

func (re Regexp) FindIndex(b []byte) (loc []int)

func (Regexp) FindReaderIndex

func (re Regexp) FindReaderIndex(r io.RuneReader) (loc []int)

func (Regexp) FindReaderSubmatchIndex

func (re Regexp) FindReaderSubmatchIndex(r io.RuneReader) []int

func (Regexp) FindString

func (re Regexp) FindString(s string) string

func (Regexp) FindStringIndex

func (re Regexp) FindStringIndex(s string) (loc []int)

func (Regexp) FindStringSubmatch

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

func (Regexp) FindStringSubmatchIndex

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

func (Regexp) FindSubmatch

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

func (Regexp) FindSubmatchIndex

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

func (Regexp) LiteralPrefix

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

func (Regexp) Longest

func (re Regexp) Longest()

func (Regexp) Match

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

func (Regexp) MatchReader

func (re Regexp) MatchReader(r io.RuneReader) bool

func (Regexp) MatchString

func (re Regexp) MatchString(s string) bool

func (Regexp) NumSubexp

func (re Regexp) NumSubexp() int

func (Regexp) ReplaceAll

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

func (Regexp) ReplaceAllFunc

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

func (Regexp) ReplaceAllLiteral

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

func (Regexp) ReplaceAllLiteralString

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

func (Regexp) ReplaceAllString

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

func (Regexp) ReplaceAllStringFunc

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

func (Regexp) Split

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

func (Regexp) String

func (re Regexp) String() string

func (Regexp) SubexpIndex

func (re Regexp) SubexpIndex(name string) int

func (Regexp) SubexpNames

func (re Regexp) SubexpNames() []string

Source Files

regexp.go regexp_dontprecompile.go

Version
v1.58.0 (latest)
Published
Apr 15, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
3 weeks ago

Tools for package owners.