regex

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

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

Processor handles regex pattern parsing, compilation, and automatic deduplication

func New

func New() *Processor

New creates a new regex processor

func NewFromNewlineSeparated

func NewFromNewlineSeparated(patterns string) *Processor

NewFromNewlineSeparated creates a new processor with newline-separated patterns

func NewWithPatterns

func NewWithPatterns(patterns []string) *Processor

NewWithPatterns creates a new processor with the given patterns

func (*Processor) Add

func (p *Processor) Add(patterns ...string)

Add adds one or more patterns with automatic deduplication

func (*Processor) AddNewlineSeparated

func (p *Processor) AddNewlineSeparated(patterns string)

AddNewlineSeparated adds newline-separated patterns

func (*Processor) Compiled

func (p *Processor) Compiled() ([]*regexp.Regexp, error)

Compiled returns the compiled regex patterns, compiling them if needed

func (*Processor) Patterns

func (p *Processor) Patterns() []string

Patterns returns the string patterns

Jump to

Keyboard shortcuts

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