cmd-zet/internal/lib/ansi.go

10 lines
162 B
Go
Raw Normal View History

package lib
import "regexp"
var ansiRegex = regexp.MustCompile(`\x1b\[[0-9;]*m`)
func StripANSI(s string) string {
return ansiRegex.ReplaceAllString(s, "")
}