Versions in this module Expand all Collapse all go1 go1.18.10 Jan 10, 2023 Changes in this version + func IsWordChar(r rune) bool + type EmptyOp uint8 + const EmptyBeginLine + const EmptyBeginText + const EmptyEndLine + const EmptyEndText + const EmptyNoWordBoundary + const EmptyWordBoundary + func EmptyOpContext(r1, r2 rune) EmptyOp + type Error struct + Code ErrorCode + Expr string + func (e *Error) Error() string + type ErrorCode string + const ErrInternalError + const ErrInvalidCharClass + const ErrInvalidCharRange + const ErrInvalidEscape + const ErrInvalidNamedCapture + const ErrInvalidPerlOp + const ErrInvalidRepeatOp + const ErrInvalidRepeatSize + const ErrInvalidUTF8 + const ErrMissingBracket + const ErrMissingParen + const ErrMissingRepeatArgument + const ErrTrailingBackslash + const ErrUnexpectedParen + func (e ErrorCode) String() string + type Flags uint16 + const ClassNL + const DotNL + const FoldCase + const Literal + const MatchNL + const NonGreedy + const OneLine + const POSIX + const Perl + const PerlX + const Simple + const UnicodeGroups + const WasDollar + type Inst struct + Arg uint32 + Op InstOp + Out uint32 + Rune []rune + func (i *Inst) MatchEmptyWidth(before rune, after rune) bool + func (i *Inst) MatchRune(r rune) bool + func (i *Inst) MatchRunePos(r rune) int + func (i *Inst) String() string + type InstOp uint8 + const InstAlt + const InstAltMatch + const InstCapture + const InstEmptyWidth + const InstFail + const InstMatch + const InstNop + const InstRune + const InstRune1 + const InstRuneAny + const InstRuneAnyNotNL + func (i InstOp) String() string + type Op uint8 + const OpAlternate + const OpAnyChar + const OpAnyCharNotNL + const OpBeginLine + const OpBeginText + const OpCapture + const OpCharClass + const OpConcat + const OpEmptyMatch + const OpEndLine + const OpEndText + const OpLiteral + const OpNoMatch + const OpNoWordBoundary + const OpPlus + const OpQuest + const OpRepeat + const OpStar + const OpWordBoundary + func (i Op) String() string + type Prog struct + Inst []Inst + NumCap int + Start int + func Compile(re *Regexp) (*Prog, error) + func (p *Prog) Prefix() (prefix string, complete bool) + func (p *Prog) StartCond() EmptyOp + func (p *Prog) String() string + type Regexp struct + Cap int + Flags Flags + Max int + Min int + Name string + Op Op + Rune []rune + Rune0 [2]rune + Sub []*Regexp + Sub0 [1]*Regexp + func Parse(s string, flags Flags) (*Regexp, error) + func (re *Regexp) CapNames() []string + func (re *Regexp) MaxCap() int + func (re *Regexp) Simplify() *Regexp + func (re *Regexp) String() string + func (x *Regexp) Equal(y *Regexp) bool