2024-04-17 20:22:30 +02:00

15 lines
218 B
Go

package helper
import (
"regexp"
"strings"
)
func RemoveNonNumeric(s string) string {
reg, err := regexp.Compile("[^0-9]+")
if err != nil {
return ""
}
return strings.TrimSpace(reg.ReplaceAllString(s, ""))
}