Documentation
¶
Overview ¶
Package capre is a regular expression held to a length.
Go's regexp unrolls a bounded repeat: [A-Za-z0-9.-]{0,254} is 254 copies of the class, 89kB of program kept from start to exit for one settings check. The same class with * is a few states, and the bound is a length check. A pattern here is whole-string (^…$), every character of it of the repeated classes, so the length is its count of characters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Regexp ¶
type Regexp struct {
// contains filtered or unexported fields
}
func MustCompile ¶
MustCompile is expr, unbounded, matching only a string of max characters at most.
func (*Regexp) MatchString ¶
MatchString is whether s, of max characters at most, matches.