(exp string)
| 39 | } |
| 40 | |
| 41 | func 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 | |
| 49 | func NewRegexp(rawRegexp *regexp.Regexp) *Regexp { |
| 50 | var reg = &Regexp{ |