package main
import (
"fmt"
"log"
"regexp"
)
func main() {
example := "#test!$!"
reg, err := regexp.Compile("[^a-zA-Z0-9]+")
go过滤非数字字母字符
![](https://img-home.csdnimg.cn/images/20240711042549.png)
package main
import (
"fmt"
"log"
"regexp"
)
func main() {
example := "#test!$!"
reg, err := regexp.Compile("[^a-zA-Z0-9]+")