regex

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(pattern string, text string) (string, error)

func FindAll

func FindAll(pattern string, text string) []string

func FindAllCompiled

func FindAllCompiled(p Pattern, text string) []string

func FindAllGroups

func FindAllGroups(pattern string, text string) ([][]string, error)

func FindCompiled

func FindCompiled(p Pattern, text string) (string, error)

func FindGroups

func FindGroups(pattern string, text string) ([]string, error)

func FindGroupsCompiled

func FindGroupsCompiled(p Pattern, text string) ([]string, error)

func IsValid

func IsValid(pattern string) bool

func Match

func Match(pattern string, text string) bool

func MatchCompiled

func MatchCompiled(p Pattern, text string) bool

func Replace

func Replace(pattern string, replacement string, text string) string

func ReplaceCompiled

func ReplaceCompiled(p Pattern, replacement string, text string) string

func ReplaceFunc

func ReplaceFunc(pattern string, replacer func(string) string, text string) string

func Split

func Split(pattern string, text string) []string

func SplitCompiled

func SplitCompiled(p Pattern, text string) []string

Types

type Pattern

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

func Compile

func Compile(pattern string) (Pattern, error)

func MustCompile

func MustCompile(pattern string) Pattern

Jump to

Keyboard shortcuts

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