Documentation
¶
Index ¶
- func SetEngine(engine Engine)
- func Version() string
- type Engine
- type Regexp
- func (r *Regexp) FindAllStringIndex(s string, n int) [][]int
- func (r *Regexp) FindString(s string) string
- func (r *Regexp) FindStringSubmatch(s string) []string
- func (r *Regexp) MatchString(s string) bool
- func (r *Regexp) NumSubexp() int
- func (r *Regexp) ReplaceAllString(src, repl string) string
- func (r *Regexp) String() string
- func (r *Regexp) SubexpNames() []string
- type Stdlib
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Engine ¶ added in v1.1.2
type Engine interface {
Compile(str string) (internal.CompiledRegexp, error)
Version() string
}
type Regexp ¶
type Regexp struct {
// contains filtered or unexported fields
}
Regexp wraps a regular expression. Compilation is deferred until first match.
func Compile ¶ added in v1.1.0
Compile parses a regular expression using the currently selected engine. If successful, returns a Regexp object that can be used to match against text.
func MustCompile ¶
MustCompile compiles a regular expression using the currently selected engine.
func (*Regexp) FindString ¶
func (*Regexp) FindStringSubmatch ¶
func (*Regexp) MatchString ¶
func (*Regexp) ReplaceAllString ¶
func (*Regexp) SubexpNames ¶ added in v1.1.0
Click to show internal directories.
Click to hide internal directories.