Documentation ¶
Index ¶
- func UnescapeUnicode(pattern string) string
- type Matcher
- type Regexp
- func (re *Regexp) FindAllIndex(bytes []byte, flags int) [][]int
- func (re *Regexp) FindAllStringIndex(str string, _ ...int) [][]int
- func (re *Regexp) FindAllStringSubmatchIndex(s string, _ int) [][]int
- func (re *Regexp) FindAllSubmatchIndex(b []byte, _ int) [][]int
- func (re *Regexp) FindIndex(bytes []byte, flags int) []int
- func (re *Regexp) FindString(s string, flags int) string
- func (re *Regexp) FindStringIndex(s string) []int
- func (re *Regexp) FindStringSubmatchIndex(s string) (indexPairs []int)
- func (re Regexp) Groups() int
- func (re *Regexp) IsCaseless() bool
- func (re *Regexp) IsMultiline() bool
- func (re *Regexp) Match(subject []byte, flags int) bool
- func (re *Regexp) MatchString(subject string, flags int) bool
- func (re *Regexp) Matcher(subject []byte, flags int) (m *Matcher)
- func (re *Regexp) MatcherString(subject string, flags int) (m *Matcher)
- func (re *Regexp) ReplaceAll(bytes, repl []byte, flags int) []byte
- func (re *Regexp) ReplaceAllString(src, repl string, flags int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnescapeUnicode ¶
Types ¶
type Regexp ¶
type Regexp struct {
// contains filtered or unexported fields
}
func CompileParse ¶
func MustCompile ¶
func (*Regexp) FindAllIndex ¶
FindAllIndex returns the start and end of the first match.
func (*Regexp) FindAllStringIndex ¶
func (*Regexp) FindAllStringSubmatchIndex ¶
func (*Regexp) FindAllSubmatchIndex ¶
func (*Regexp) FindIndex ¶
FindIndex returns the start and end of the first match, or nil if no match. loc[0] is the start and loc[1] is the end.
func (*Regexp) FindString ¶
FindString returns the start and end of the first match, or nil if no match. loc[0] is the start and loc[1] is the end.
func (*Regexp) FindStringIndex ¶
func (*Regexp) FindStringSubmatchIndex ¶
func (*Regexp) IsCaseless ¶
IsCaseless checks if regexp is case insensetive
func (*Regexp) IsMultiline ¶
IsMultiline checks if regexp is multiline
func (*Regexp) Match ¶
Match tries to match the speficied byte array slice to the current pattern. Returns true if the match succeeds.
func (*Regexp) MatchString ¶
MatchString is same as Match, but accept string as argument
func (*Regexp) Matcher ¶
Matcher returns a new matcher object, with the byte array slice as a subject.
func (*Regexp) MatcherString ¶
MatcherString returns a new matcher object, with the specified subject string.
func (*Regexp) ReplaceAll ¶
ReplaceAll returns a copy of a byte slice with pattern matches replaced by repl.