pattern

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyPattern      = fmt.Errorf("pattern can't be empty")
	ErrCompilationFailed = fmt.Errorf("pattern compilation failed")
)

Functions

This section is empty.

Types

type List

type List []*regexp.Regexp

List is a list of regular expressions.

func NewList

func NewList(strs ...string) (List, error)

NewList parses slice of strings to a slice of compiled regular expressions.

func (List) MatchFullString

func (l List) MatchFullString(str string) bool

MatchFullString matches provided string against all regexps in a slice and returns true if any of them matches whole string.

func (*List) Set

func (l *List) Set(value string) error

func (*List) String

func (l *List) String() string

Jump to

Keyboard shortcuts

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