mod: golang.org/x/mod/internal/lazyregexp Index | Files

package lazyregexp

import "golang.org/x/mod/internal/lazyregexp"

Package lazyregexp is a thin wrapper over regexp, allowing the use of global regexp variables without forcing them to be compiled at init.

Index

Package Files

lazyre.go

type Regexp Uses

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

Regexp is a wrapper around regexp.Regexp, where the underlying regexp will be compiled the first time it is needed.

func New Uses

func New(str string) *Regexp

New creates a new lazy regexp, delaying the compiling work until it is first needed. If the code is being run as part of tests, the regexp compiling will happen immediately.

func (*Regexp) FindAllString Uses

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

func (*Regexp) FindString Uses

func (r *Regexp) FindString(s string) string

func (*Regexp) FindStringSubmatch Uses

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

func (*Regexp) FindStringSubmatchIndex Uses

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

func (*Regexp) FindSubmatch Uses

func (r *Regexp) FindSubmatch(s []byte) [][]byte

func (*Regexp) MatchString Uses

func (r *Regexp) MatchString(s string) bool

func (*Regexp) ReplaceAllString Uses

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

func (*Regexp) SubexpNames Uses

func (r *Regexp) SubexpNames() []string

Package lazyregexp imports 4 packages (graph) and is imported by 4 packages. Updated 2019-11-21. Refresh now. Tools for package owners.