Documentation
¶
Index ¶
- Variables
- func RegexpAppendOption(raw string, option regexp2.RegexOptions) string
- type RegWrapperInterface
- type Regexp2Wrapper
- func (r *Regexp2Wrapper) CanUse() bool
- func (r *Regexp2Wrapper) Find(b []byte) ([]byte, error)
- func (r *Regexp2Wrapper) FindAll(b []byte) ([][]byte, error)
- func (r *Regexp2Wrapper) FindAllString(s string) ([]string, error)
- func (r *Regexp2Wrapper) FindAllSubmatchIndex(s string) ([][]int, error)
- func (r *Regexp2Wrapper) FindString(s string) (string, error)
- func (r *Regexp2Wrapper) FindStringSubmatch(s string) ([]string, error)
- func (r *Regexp2Wrapper) FindSubmatch(b []byte) ([][]byte, error)
- func (r *Regexp2Wrapper) Match(b []byte) (bool, error)
- func (r *Regexp2Wrapper) MatchString(s string) (bool, error)
- func (r *Regexp2Wrapper) ReplaceAll(src, repl []byte) ([]byte, error)
- func (r *Regexp2Wrapper) ReplaceAllFunc(src []byte, repl func([]byte) []byte) ([]byte, error)
- func (r *Regexp2Wrapper) ReplaceAllString(src, repl string) (string, error)
- func (r *Regexp2Wrapper) ReplaceAllStringFunc(src string, repl func(string) string) (string, error)
- func (r *Regexp2Wrapper) String() string
- type RegexpWrapper
- func (r *RegexpWrapper) CanUse() bool
- func (r *RegexpWrapper) Find(b []byte) ([]byte, error)
- func (r *RegexpWrapper) FindAll(b []byte) ([][]byte, error)
- func (r *RegexpWrapper) FindAllString(s string) ([]string, error)
- func (r *RegexpWrapper) FindAllSubmatchIndex(s string) ([][]int, error)
- func (r *RegexpWrapper) FindString(s string) (string, error)
- func (r *RegexpWrapper) FindStringSubmatch(s string) ([]string, error)
- func (r *RegexpWrapper) FindSubmatch(b []byte) ([][]byte, error)
- func (r *RegexpWrapper) Match(b []byte) (bool, error)
- func (r *RegexpWrapper) MatchString(s string) (bool, error)
- func (r *RegexpWrapper) ReplaceAll(src, repl []byte) ([]byte, error)
- func (r *RegexpWrapper) ReplaceAllFunc(src []byte, repl func([]byte) []byte) ([]byte, error)
- func (r *RegexpWrapper) ReplaceAllString(src, repl string) (string, error)
- func (r *RegexpWrapper) ReplaceAllStringFunc(src string, repl func(string) string) (string, error)
- func (r *RegexpWrapper) String() string
- type YakRegexpManager
- type YakRegexpUtils
- func (m *YakRegexpUtils) CanUse() bool
- func (m *YakRegexpUtils) Find(b []byte) ([]byte, error)
- func (m *YakRegexpUtils) FindAll(b []byte) ([][]byte, error)
- func (m *YakRegexpUtils) FindAllString(s string) ([]string, error)
- func (m *YakRegexpUtils) FindAllSubmatchIndex(s string) ([][]int, error)
- func (m *YakRegexpUtils) FindString(s string) (string, error)
- func (m *YakRegexpUtils) FindStringSubmatch(s string) ([]string, error)
- func (m *YakRegexpUtils) FindSubmatch(b []byte) ([][]byte, error)
- func (m *YakRegexpUtils) Hash() string
- func (m *YakRegexpUtils) Match(b []byte) (bool, error)
- func (m *YakRegexpUtils) MatchString(s string) (bool, error)
- func (m *YakRegexpUtils) ReplaceAll(src, repl []byte) ([]byte, error)
- func (m *YakRegexpUtils) ReplaceAllFunc(src []byte, repl func([]byte) []byte) ([]byte, error)
- func (m *YakRegexpUtils) ReplaceAllString(src, repl string) (string, error)
- func (m *YakRegexpUtils) ReplaceAllStringFunc(src string, repl func(string) string) (string, error)
- func (m *YakRegexpUtils) SetPriority(mode regexpMode)
- func (m *YakRegexpUtils) String() string
- type YakRegexpUtilsOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RegexpMode1 regexpMode = "re1" RegexpMode2 regexpMode = "re2" )
View Source
var DefaultYakRegexpManager = NewYakRegexpManager()
Functions ¶
func RegexpAppendOption ¶
func RegexpAppendOption(raw string, option regexp2.RegexOptions) string
Types ¶
type RegWrapperInterface ¶
type RegWrapperInterface interface {
Match(b []byte) (bool, error)
MatchString(s string) (bool, error)
Find(b []byte) ([]byte, error)
FindString(s string) (string, error)
FindAll(b []byte) ([][]byte, error)
FindAllString(s string) ([]string, error)
FindSubmatch(b []byte) ([][]byte, error)
FindStringSubmatch(s string) ([]string, error)
FindAllSubmatchIndex(s string) ([][]int, error)
ReplaceAll(src, repl []byte) ([]byte, error)
ReplaceAllString(src, repl string) (string, error)
ReplaceAllFunc(src []byte, repl func([]byte) []byte) ([]byte, error)
ReplaceAllStringFunc(src string, repl func(string) string) (string, error)
CanUse() bool
String() string
}
type Regexp2Wrapper ¶
type Regexp2Wrapper struct {
// contains filtered or unexported fields
}
func NewRegexp2Wrapper ¶
func NewRegexp2Wrapper(raw string, options regexp2.RegexOptions) *Regexp2Wrapper
func (*Regexp2Wrapper) CanUse ¶
func (r *Regexp2Wrapper) CanUse() bool
func (*Regexp2Wrapper) FindAllString ¶
func (r *Regexp2Wrapper) FindAllString(s string) ([]string, error)
func (*Regexp2Wrapper) FindAllSubmatchIndex ¶
func (r *Regexp2Wrapper) FindAllSubmatchIndex(s string) ([][]int, error)
func (*Regexp2Wrapper) FindString ¶
func (r *Regexp2Wrapper) FindString(s string) (string, error)
func (*Regexp2Wrapper) FindStringSubmatch ¶
func (r *Regexp2Wrapper) FindStringSubmatch(s string) ([]string, error)
func (*Regexp2Wrapper) FindSubmatch ¶
func (r *Regexp2Wrapper) FindSubmatch(b []byte) ([][]byte, error)
func (*Regexp2Wrapper) MatchString ¶
func (r *Regexp2Wrapper) MatchString(s string) (bool, error)
func (*Regexp2Wrapper) ReplaceAll ¶
func (r *Regexp2Wrapper) ReplaceAll(src, repl []byte) ([]byte, error)
func (*Regexp2Wrapper) ReplaceAllFunc ¶
func (*Regexp2Wrapper) ReplaceAllString ¶
func (r *Regexp2Wrapper) ReplaceAllString(src, repl string) (string, error)
func (*Regexp2Wrapper) ReplaceAllStringFunc ¶
func (*Regexp2Wrapper) String ¶
func (r *Regexp2Wrapper) String() string
type RegexpWrapper ¶
type RegexpWrapper struct {
// contains filtered or unexported fields
}
func NewRegexpWrapper ¶
func NewRegexpWrapper(raw string) *RegexpWrapper
func (*RegexpWrapper) CanUse ¶
func (r *RegexpWrapper) CanUse() bool
func (*RegexpWrapper) FindAllString ¶
func (r *RegexpWrapper) FindAllString(s string) ([]string, error)
func (*RegexpWrapper) FindAllSubmatchIndex ¶
func (r *RegexpWrapper) FindAllSubmatchIndex(s string) ([][]int, error)
func (*RegexpWrapper) FindString ¶
func (r *RegexpWrapper) FindString(s string) (string, error)
func (*RegexpWrapper) FindStringSubmatch ¶
func (r *RegexpWrapper) FindStringSubmatch(s string) ([]string, error)
func (*RegexpWrapper) FindSubmatch ¶
func (r *RegexpWrapper) FindSubmatch(b []byte) ([][]byte, error)
func (*RegexpWrapper) MatchString ¶
func (r *RegexpWrapper) MatchString(s string) (bool, error)
func (*RegexpWrapper) ReplaceAll ¶
func (r *RegexpWrapper) ReplaceAll(src, repl []byte) ([]byte, error)
func (*RegexpWrapper) ReplaceAllFunc ¶
func (*RegexpWrapper) ReplaceAllString ¶
func (r *RegexpWrapper) ReplaceAllString(src, repl string) (string, error)
func (*RegexpWrapper) ReplaceAllStringFunc ¶
func (*RegexpWrapper) String ¶
func (r *RegexpWrapper) String() string
type YakRegexpManager ¶
type YakRegexpManager struct {
// contains filtered or unexported fields
}
func NewYakRegexpManager ¶
func NewYakRegexpManager() *YakRegexpManager
func (*YakRegexpManager) GetYakRegexp ¶
func (manager *YakRegexpManager) GetYakRegexp(raw string, options ...YakRegexpUtilsOption) *YakRegexpUtils
type YakRegexpUtils ¶
type YakRegexpUtils struct {
// contains filtered or unexported fields
}
func NewYakRegexpUtils ¶
func NewYakRegexpUtils(raw string, options ...YakRegexpUtilsOption) *YakRegexpUtils
func (*YakRegexpUtils) CanUse ¶
func (m *YakRegexpUtils) CanUse() bool
func (*YakRegexpUtils) FindAllString ¶
func (m *YakRegexpUtils) FindAllString(s string) ([]string, error)
func (*YakRegexpUtils) FindAllSubmatchIndex ¶
func (m *YakRegexpUtils) FindAllSubmatchIndex(s string) ([][]int, error)
func (*YakRegexpUtils) FindString ¶
func (m *YakRegexpUtils) FindString(s string) (string, error)
func (*YakRegexpUtils) FindStringSubmatch ¶
func (m *YakRegexpUtils) FindStringSubmatch(s string) ([]string, error)
func (*YakRegexpUtils) FindSubmatch ¶
func (m *YakRegexpUtils) FindSubmatch(b []byte) ([][]byte, error)
func (*YakRegexpUtils) Hash ¶
func (m *YakRegexpUtils) Hash() string
func (*YakRegexpUtils) MatchString ¶
func (m *YakRegexpUtils) MatchString(s string) (bool, error)
func (*YakRegexpUtils) ReplaceAll ¶
func (m *YakRegexpUtils) ReplaceAll(src, repl []byte) ([]byte, error)
func (*YakRegexpUtils) ReplaceAllFunc ¶
func (*YakRegexpUtils) ReplaceAllString ¶
func (m *YakRegexpUtils) ReplaceAllString(src, repl string) (string, error)
func (*YakRegexpUtils) ReplaceAllStringFunc ¶
func (*YakRegexpUtils) SetPriority ¶
func (m *YakRegexpUtils) SetPriority(mode regexpMode)
func (*YakRegexpUtils) String ¶
func (m *YakRegexpUtils) String() string
type YakRegexpUtilsOption ¶
type YakRegexpUtilsOption func(*YakRegexpUtils)
func WithPriorityMode ¶
func WithPriorityMode(mode regexpMode) YakRegexpUtilsOption
func WithRegexpOption ¶
func WithRegexpOption(option regexp2.RegexOptions) YakRegexpUtilsOption
Click to show internal directories.
Click to hide internal directories.