MCPcopy Create free account
hub / github.com/brimdata/super / CompileRegexp

Function CompileRegexp

runtime/sam/expr/boolean.go:231–240  ·  view source on GitHub ↗
(pattern string)

Source from the content-addressed store, hash-verified

229}
230
231func CompileRegexp(pattern string) (*regexp.Regexp, error) {
232 re, err := regexp.Compile(pattern)
233 if err != nil {
234 if syntaxErr, ok := err.(*syntax.Error); ok {
235 syntaxErr.Expr = pattern
236 }
237 return nil, err
238 }
239 return re, err
240}
241
242// NewRegexpBoolean returns a Boolean that compares values that must
243// be a stringy the given regexp.

Callers 4

regexpMethod · 0.92
semCallByNameMethod · 0.92
compileRegexpMatchMethod · 0.92
compileRegexpSearchMethod · 0.92

Calls 1

CompileMethod · 0.80

Tested by

no test coverage detected