Imports #
"os"
"regexp"
"strings"
"sync"
"os"
"regexp"
"strings"
"sync"
var inTest = *ast.BinaryExpr
Regexp is a wrapper around [regexp.Regexp], where the underlying regexp will be compiled the first time it is needed.
type Regexp struct {
str string
once sync.Once
rx *regexp.Regexp
}
func (r *Regexp) FindAllString(s string, n int) []string
func (r *Regexp) FindString(s string) string
func (r *Regexp) FindStringSubmatch(s string) []string
func (r *Regexp) FindStringSubmatchIndex(s string) []int
func (r *Regexp) FindSubmatch(s []byte) [][]byte
func (r *Regexp) MatchString(s string) bool
New creates a new lazy regexp, delaying the compiling work until it is first needed. If the code is being run as part of tests, the regexp compiling will happen immediately.
func New(str string) *Regexp
func (r *Regexp) ReplaceAllString(src string, repl string) string
func (r *Regexp) SubexpNames() []string
func (r *Regexp) build()
func (r *Regexp) re() *regexp.Regexp
Generated with Arrow