Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalRawExpr ¶
EvalRawExpr matches a raw expression against a string
Types ¶
type EvalError ¶
type EvalError string
EvalError occurs when an expression fails to evaluate because it is in improper RPN
type Expr ¶
type Expr struct {
// contains filtered or unexported fields
}
Expr represents a Rematch expression.
func (*Expr) Compile ¶
Compile an expression. A compiled expression will not be recompiled. This is useful when reusing an expression multiple times against different texts
func (*Expr) Compiled ¶
Compiled returns if the expression has been compiled into Reverse Polish notation.
func (*Expr) MarshalJSON ¶
MarshalJSON implements JSON marshalling
func (*Expr) Raw ¶
Raw returns the raw expression string before conversion into Reverse Polish notation. Validation of a raw expression is not confirmed until it is compiled.
func (*Expr) UnmarshalJSON ¶
UnmarshalJSON implements JSON unmarshalling
type Result ¶
Result is the output after evaluating a query.
Strings contains a non-unique/non-ordered collection of token matches from the given expression.
func ExprFindAll ¶
ExprFindAll matches an expression against a string, returning all matched tokens if true
func RawExprFindAll ¶
RawExprFindAll matches a raw expression against a string, returning all matched tokens if true
type SyntaxError ¶
type SyntaxError string
SyntaxError occurs when an expression is malformed.
func (SyntaxError) Error ¶
func (e SyntaxError) Error() string