Documentation ¶
Index ¶
- Constants
- func MatchString(pattern string, s string) (matched bool, error error)
- func QuoteMeta(s string) string
- type MatchData
- type NamedGroupInfo
- type Regexp
- func (re *Regexp) ClearMatchData()
- func (re *Regexp) Find(b []byte) []byte
- func (re *Regexp) FindAll(b []byte, n int) [][]byte
- func (re *Regexp) FindAllIndex(b []byte, n int) [][]int
- func (re *Regexp) FindAllString(s string, n int) []string
- func (re *Regexp) FindAllStringIndex(s string, n int) [][]int
- func (re *Regexp) FindAllStringSubmatch(s string, n int) [][]string
- func (re *Regexp) FindAllStringSubmatchIndex(s string, n int) [][]int
- func (re *Regexp) FindAllSubmatch(b []byte, n int) [][][]byte
- func (re *Regexp) FindAllSubmatchIndex(b []byte, n int) [][]int
- func (re *Regexp) FindIndex(b []byte) []int
- func (re *Regexp) FindReaderIndex(r io.RuneReader) []int
- func (re *Regexp) FindReaderSubmatchIndex(r io.RuneReader) []int
- func (re *Regexp) FindString(s string) string
- func (re *Regexp) FindStringIndex(s string) []int
- func (re *Regexp) FindStringSubmatch(s string) []string
- func (re *Regexp) FindStringSubmatchIndex(s string) []int
- func (re *Regexp) FindSubmatch(b []byte) [][]byte
- func (re *Regexp) FindSubmatchIndex(b []byte) []int
- func (re *Regexp) Free()
- func (re *Regexp) Gsub(src, repl string) string
- func (re *Regexp) GsubFunc(src string, replFunc func(string, map[string]string) string) string
- func (re *Regexp) LiteralPrefix() (prefix string, complete bool)
- func (re *Regexp) Match(b []byte) bool
- func (re *Regexp) MatchReader(r io.RuneReader) bool
- func (re *Regexp) MatchString(s string) bool
- func (re *Regexp) NumSubexp() int
- func (re *Regexp) ReplaceAll(src, repl []byte) []byte
- func (re *Regexp) ReplaceAllFunc(src []byte, repl func([]byte) []byte) []byte
- func (re *Regexp) ReplaceAllString(src, repl string) string
- func (re *Regexp) ReplaceAllStringFunc(src string, repl func(string) string) string
- func (re *Regexp) String() string
Constants ¶
View Source
const ( ONIG_OPTION_DEFAULT = ONIG_OPTION_NONE /* options */ ONIG_OPTION_NONE = 0 ONIG_OPTION_IGNORECASE = 1 ONIG_OPTION_EXTEND = (ONIG_OPTION_IGNORECASE << 1) ONIG_OPTION_MULTILINE = (ONIG_OPTION_EXTEND << 1) ONIG_OPTION_SINGLELINE = (ONIG_OPTION_MULTILINE << 1) ONIG_OPTION_FIND_LONGEST = (ONIG_OPTION_SINGLELINE << 1) ONIG_OPTION_FIND_NOT_EMPTY = (ONIG_OPTION_FIND_LONGEST << 1) ONIG_OPTION_NEGATE_SINGLELINE = (ONIG_OPTION_FIND_NOT_EMPTY << 1) ONIG_OPTION_DONT_CAPTURE_GROUP = (ONIG_OPTION_NEGATE_SINGLELINE << 1) ONIG_OPTION_CAPTURE_GROUP = (ONIG_OPTION_DONT_CAPTURE_GROUP << 1) /* options (search time) */ ONIG_OPTION_NOTBOL = (ONIG_OPTION_CAPTURE_GROUP << 1) ONIG_OPTION_NOTEOL = (ONIG_OPTION_NOTBOL << 1) ONIG_OPTION_POSIX_REGION = (ONIG_OPTION_NOTEOL << 1) ONIG_OPTION_MAXBIT = ONIG_OPTION_POSIX_REGION /* limit */ ONIG_NORMAL = 0 ONIG_MISMATCH = -1 ONIG_MISMATCH_STR = "mismatch" ONIGERR_UNDEFINED_NAME_REFERENCE = -217 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NamedGroupInfo ¶
type Regexp ¶
type Regexp struct {
// contains filtered or unexported fields
}
func MustCompile ¶
func MustCompileWithOption ¶
func (*Regexp) ClearMatchData ¶
func (re *Regexp) ClearMatchData()
func (*Regexp) FindAllStringSubmatch ¶
func (*Regexp) FindAllStringSubmatchIndex ¶
func (*Regexp) FindAllSubmatchIndex ¶
func (*Regexp) FindReaderIndex ¶
func (re *Regexp) FindReaderIndex(r io.RuneReader) []int
func (*Regexp) FindReaderSubmatchIndex ¶
func (re *Regexp) FindReaderSubmatchIndex(r io.RuneReader) []int
func (*Regexp) FindString ¶
func (*Regexp) FindStringIndex ¶
func (*Regexp) FindStringSubmatch ¶
func (*Regexp) FindStringSubmatchIndex ¶
func (*Regexp) FindSubmatch ¶
func (*Regexp) FindSubmatchIndex ¶
func (*Regexp) LiteralPrefix ¶
func (*Regexp) MatchReader ¶
func (re *Regexp) MatchReader(r io.RuneReader) bool
func (*Regexp) MatchString ¶
func (*Regexp) ReplaceAll ¶
func (*Regexp) ReplaceAllFunc ¶
func (*Regexp) ReplaceAllString ¶
func (*Regexp) ReplaceAllStringFunc ¶
Click to show internal directories.
Click to hide internal directories.