MCPcopy
hub / github.com/bitfield/script / ExamplePipe_RejectRegexp

Function ExamplePipe_RejectRegexp

script_test.go:2526–2531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2524}
2525
2526func ExamplePipe_RejectRegexp() {
2527 re := regexp.MustCompile("w.*d")
2528 script.Echo("hello\nworld\n").RejectRegexp(re).Stdout()
2529 // Output:
2530 // hello
2531}
2532
2533func ExamplePipe_Replace() {
2534 script.Echo("a\nb\nc\n").Replace("b", "replacement").Stdout()

Callers

nothing calls this directly

Calls 3

EchoFunction · 0.92
StdoutMethod · 0.80
RejectRegexpMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…