regexp

package
v0.0.0-...-015bfa9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RX_CHAR = instrCode(iota)
	RX_CLASS
	RX_ASSERT
	RX_MATCH
	RX_JMP
	RX_SPLIT
	RX_SAVE
)

Variables

View Source
var BAssert = nodeAssert{
	// contains filtered or unexported fields
}
View Source
var DClass = nodeClass{
	// contains filtered or unexported fields
}
View Source
var SClass = nodeClass{
	// contains filtered or unexported fields
}
View Source
var WClass = nodeClass{
	// contains filtered or unexported fields
}

Functions

This section is empty.

Types

type Matchable

type Matchable interface {
	Size() int
	At(int) rune
	SelectionRunes(util.Sel) []rune
}

type Regex

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

func Compile

func Compile(rx string, find, bw bool) *Regex

* Compiles a regex - rx: the regular expression string - find: true if we want to do a find operation, false if we want to do a match operation - bw: compile the regular expression backwards

func CompileFuzzySearch

func CompileFuzzySearch(s []rune) *Regex

Compiles a regex to do a non-contiguous search of string s

func (*Regex) Match

func (rx *Regex) Match(b Matchable, start, end int, dir int) []int

func (*Regex) String

func (rx *Regex) String() string

type RuneArrayMatchable

type RuneArrayMatchable []rune

func (RuneArrayMatchable) At

func (ram RuneArrayMatchable) At(i int) rune

func (RuneArrayMatchable) SelectionRunes

func (ram RuneArrayMatchable) SelectionRunes(sel util.Sel) []rune

func (RuneArrayMatchable) Size

func (ram RuneArrayMatchable) Size() int

Jump to

Keyboard shortcuts

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