re

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Regexp

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

func Compile

func Compile(exp string) (*Regexp, error)

func MustCompile

func MustCompile(exp string) *Regexp

func NewRegexp

func NewRegexp(rawRegexp *regexp.Regexp) *Regexp

func (*Regexp) FindStringSubmatch added in v0.4.9

func (this *Regexp) FindStringSubmatch(s string) []string

func (*Regexp) IdString

func (this *Regexp) IdString() string

func (*Regexp) IsCaseInsensitive

func (this *Regexp) IsCaseInsensitive() bool

func (*Regexp) Keywords

func (this *Regexp) Keywords() []string

func (*Regexp) Match

func (this *Regexp) Match(s []byte) bool

func (*Regexp) MatchString

func (this *Regexp) MatchString(s string) bool

func (*Regexp) ParseKeywords

func (this *Regexp) ParseKeywords(exp string) (keywords []string)

ParseKeywords 提取表达式中的关键词

func (*Regexp) Raw

func (this *Regexp) Raw() *regexp.Regexp

type RuneMap

type RuneMap map[rune]*RuneTree

func NewRuneTree

func NewRuneTree(list []string) RuneMap

func (*RuneMap) Lookup

func (this *RuneMap) Lookup(s string, caseInsensitive bool) bool

type RuneTree

type RuneTree struct {
	Children RuneMap
	IsEnd    bool
}

Jump to

Keyboard shortcuts

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