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

Function Regexp

internal/testify/require/require.go:1855–1863  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1853// assert.Regexp(t, regexp.MustCompile("start"), "it's starting")
1854// assert.Regexp(t, "start...$", "it's not starting")
1855func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {
1856 if h, ok := t.(tHelper); ok {
1857 h.Helper()
1858 }
1859 if assert.Regexp(t, rx, str, msgAndArgs...) {
1860 return
1861 }
1862 t.FailNow()
1863}
1864
1865// Regexpf asserts that a specified regexp matches a string.
1866//

Callers 1

RegexpMethod · 0.70

Calls 3

RegexpFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…