MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Compile

Function Compile

internal/re/regexp.go:41–47  ·  view source on GitHub ↗
(exp string)

Source from the content-addressed store, hash-verified

39}
40
41func Compile(exp string) (*Regexp, error) {
42 reg, err := regexp.Compile(exp)
43 if err != nil {
44 return nil, err
45 }
46 return NewRegexp(reg), nil
47}
48
49func NewRegexp(rawRegexp *regexp.Regexp) *Regexp {
50 var reg = &Regexp{

Callers 3

TestRegexp_SpecialFunction · 0.92
TestRegexp_Special2Function · 0.92
InitMethod · 0.92

Calls 1

NewRegexpFunction · 0.85

Tested by 2

TestRegexp_SpecialFunction · 0.74
TestRegexp_Special2Function · 0.74