cml04-l2-rsm-in/internal/helpers/helper.go

10 lines
199 B
Go
Raw Normal View History

2024-08-20 10:08:32 +02:00
package helpers
import "regexp"
func CleanString(s string) string {
// reg expression only alfanumeric characters
reg := regexp.MustCompile("[^a-zA-Z0-9]+")
return reg.ReplaceAllString(s, "")
}