regexps

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const KeywordPattern = `[a-zA-Z0-9]+?[-'a-zA-Z0-9]*[a-zA-Z0-9]+?|[a-zA-Z0-9]+`

Variables

View Source
var (
	RxNonWord     = regexp.MustCompile(`[^a-zA-Z0-9]`)
	RxEmptySpace  = regexp.MustCompile(`\s+`)
	RxLanguageKey = regexp.MustCompile(`language:(\*|[a-z][-a-zA-Z]+)\s*`)
	RxKeyword     = regexp.MustCompile(`^(` + KeywordPattern + `)$`)
	RxKeywords    = regexp.MustCompile(`\b(` + KeywordPattern + `)\b`)
)

Functions

func Compile

func Compile(expr string) (rx *regexp.Regexp, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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