dnscontrol/providers/transip/slashes.go
Vincent Hagen ef081da1a6
TRANSIP: Fixed integration tests: Edge cases and TXT records fixed (#2673)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-12-04 11:54:03 -05:00

11 lines
201 B
Go

package transip
import (
"regexp"
)
var removeSlashesRegexp = regexp.MustCompile(`(?:\\(\\)+)|(?:\\)`)
func removeSlashes(s string) string {
return removeSlashesRegexp.ReplaceAllString(s, "$1")
}