summaryrefslogtreecommitdiff
path: root/src/pkg/regexp/regexp.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/regexp/regexp.go')
-rw-r--r--src/pkg/regexp/regexp.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go
index b1baf67c7..1559da23e 100644
--- a/src/pkg/regexp/regexp.go
+++ b/src/pkg/regexp/regexp.go
@@ -883,7 +883,7 @@ func (re *Regexp) ReplaceAllString(src, repl string) string {
// Copy the unmatched characters after the last match.
io.WriteString(buf, src[lastMatchEnd:len(src)]);
- return string(buf.Data());
+ return string(buf.Bytes());
}
// ReplaceAll returns a copy of src in which all matches for the Regexp
@@ -927,7 +927,7 @@ func (re *Regexp) ReplaceAll(src, repl []byte) []byte {
// Copy the unmatched characters after the last match.
buf.Write(src[lastMatchEnd:len(src)]);
- return buf.Data();
+ return buf.Bytes();
}
// QuoteMeta returns a string that quotes all regular expression metacharacters