textmatch

package
v0.3.19 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRegexp

func IsRegexp(p Pattern) bool

IsRegexp reports whether p is implemented using regexp. False means that the underlying matcher is something optimized.

Types

type Pattern

type Pattern interface {
	MatchString(s string) bool
	Match(b []byte) bool
}

Pattern is a compiled regular expression.

func Compile

func Compile(re string) (Pattern, error)

Compile parses a regular expression and returns a compiled pattern that can match inputs descriped by the regexp.

Semantically it's close to the regexp.Compile, but it does recognize some common patterns and creates a more optimized matcher for them.

Jump to

Keyboard shortcuts

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