Documentation ¶
Overview ¶
Package regex provides a registry of precompiled regular expressions to allow reusing them without the syntactic overhead of declaring pattern variables everywhere in the code. The registry is not thread-safe, but the precompiled patterns are.
Index ¶
- type Pattern
- type Registry
- func (r *Registry) Compile(re Pattern) *regexp.Regexp
- func (r *Registry) Match(s string, re Pattern) []string
- func (r *Registry) Match1(s string, re Pattern) (matched bool, m1 string)
- func (r *Registry) Match2(s string, re Pattern) (matched bool, m1, m2 string)
- func (r *Registry) Match3(s string, re Pattern) (matched bool, m1, m2, m3 string)
- func (r *Registry) Matches(s string, re Pattern) bool
- func (r *Registry) PrintStats(out io.Writer)
- func (r *Registry) Profiling()
- func (r *Registry) ReplaceFirst(s string, re Pattern, replacement string) ([]string, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.