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

Function ExamplePipe_ReplaceRegexp

script_test.go:2541–2547  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2539}
2540
2541func ExamplePipe_ReplaceRegexp() {
2542 re := regexp.MustCompile("w.*d")
2543 script.Echo("hello\nworld\n").ReplaceRegexp(re, "replacement").Stdout()
2544 // Output:
2545 // hello
2546 // replacement
2547}
2548
2549func ExamplePipe_SHA256Sum() {
2550 sum, err := script.Echo("hello world").SHA256Sum()

Callers

nothing calls this directly

Calls 3

EchoFunction · 0.92
StdoutMethod · 0.80
ReplaceRegexpMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…