MCPcopy
hub / github.com/expr-lang/expr / Regexp

Method Regexp

internal/testify/assert/assertion_forward.go:1463–1468  ·  view source on GitHub ↗

Regexp asserts that a specified regexp matches a string. a.Regexp(regexp.MustCompile("start"), "it's starting") a.Regexp("start...$", "it's not starting")

(rx interface{}, str interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1461// a.Regexp(regexp.MustCompile("start"), "it's starting")
1462// a.Regexp("start...$", "it's not starting")
1463func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool {
1464 if h, ok := a.t.(tHelper); ok {
1465 h.Helper()
1466 }
1467 return Regexp(a.t, rx, str, msgAndArgs...)
1468}
1469
1470// Regexpf asserts that a specified regexp matches a string.
1471//

Callers 1

TestRegexpWrapperFunction · 0.45

Calls 2

RegexpFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestRegexpWrapperFunction · 0.36