regex

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleSet

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

func NewRuleSet

func NewRuleSet(include, exclude []*regexp.Regexp) *RuleSet

NewRuleSet returns the RuleSet with given include and exclude rules. When only the exclude rules are specified, the include rule is set to match everything.

func (*RuleSet) Match

func (r *RuleSet) Match(s string) bool

Match returns true if the given string matches at least one of the include rules and does not match the exclude rules.

Jump to

Keyboard shortcuts

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