MCPcopy Index your code
hub / github.com/bitfield/script / ExamplePipe_MatchRegexp

Function ExamplePipe_MatchRegexp

script_test.go:2487–2492  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2485}
2486
2487func ExamplePipe_MatchRegexp() {
2488 re := regexp.MustCompile("w.*d")
2489 script.Echo("hello\nworld\n").MatchRegexp(re).Stdout()
2490 // Output:
2491 // world
2492}
2493
2494func ExamplePipe_Post() {
2495 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 3

EchoFunction · 0.92
StdoutMethod · 0.80
MatchRegexpMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…