Replace replaces all occurrences of the string search with the string replace.
(search, replace string)
| 835 | // Replace replaces all occurrences of the string search with the string |
| 836 | // replace. |
| 837 | func (p *Pipe) Replace(search, replace string) *Pipe { |
| 838 | return p.FilterLine(func(line string) string { |
| 839 | return strings.ReplaceAll(line, search, replace) |
| 840 | }) |
| 841 | } |
| 842 | |
| 843 | // ReplaceRegexp replaces all matches of the compiled regexp re with the string |
| 844 | // replace. $x variables in the replace string are interpreted as by |