10 lines
199 B
Go
10 lines
199 B
Go
|
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, "")
|
||
|
}
|