Documentation ¶
Index ¶
- Variables
- func AnythingBut(args ...rune) *syntax.Regexp
- func AtLeastOne(sub ...*syntax.Regexp) *syntax.Regexp
- func CompileRegex(subs ...*syntax.Regexp) (*regexp.Regexp, error)
- func Either(sub ...interface{}) *syntax.Regexp
- func Group(name string, sub ...*syntax.Regexp) *syntax.Regexp
- func Max(times int, sub ...*syntax.Regexp) *syntax.Regexp
- func Maybe(sub ...interface{}) *syntax.Regexp
- func Min(times int, sub ...*syntax.Regexp) *syntax.Regexp
- func Range(rng ...rune) *syntax.Regexp
- func Regex(subs ...*syntax.Regexp) *regexp.Regexp
- func Repeat(times int, sub ...*syntax.Regexp) *syntax.Regexp
- func Sequence(subs ...*syntax.Regexp) *syntax.Regexp
- func Then(match string) *syntax.Regexp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StartOfLine = &syntax.Regexp{ Op: syntax.OpBeginLine, } EndOfLine = &syntax.Regexp{ Op: syntax.OpEndLine, } StartOfText = &syntax.Regexp{ Op: syntax.OpBeginText, } EndOfText = &syntax.Regexp{ Op: syntax.OpEndText, } Digit = &syntax.Regexp{ Op: syntax.OpCharClass, Rune: digits, } Period = &syntax.Regexp{ Op: syntax.OpLiteral, Rune: []rune{'.'}, } Digits = &syntax.Regexp{ Op: syntax.OpPlus, Sub: []*syntax.Regexp{Digit}, } Lowercase = &syntax.Regexp{ Op: syntax.OpCharClass, Rune: lowercaseAlpha, } Uppercase = &syntax.Regexp{ Op: syntax.OpCharClass, Rune: uppercaseAlpha, } Alpha = &syntax.Regexp{ Op: syntax.OpCharClass, Rune: alpha, } Alphanum = &syntax.Regexp{ Op: syntax.OpCharClass, Rune: alphanum, } Anything = &syntax.Regexp{ Op: syntax.OpAnyChar, } Word = &syntax.Regexp{ Op: syntax.OpPlus, Sub: []*syntax.Regexp{Alphanum}, } Newline = &syntax.Regexp{ Op: syntax.OpLiteral, Rune: []rune("\n"), } Whitespace = &syntax.Regexp{ Op: syntax.OpPlus, Sub: []*syntax.Regexp{ &syntax.Regexp{ Op: syntax.OpCharClass, Rune: whitespaces, }, }, } )
Functions ¶
func AnythingBut ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.