mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
13 lines
195 B
Go
13 lines
195 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"regexp"
|
|
)
|
|
|
|
func main() {
|
|
replaceCharReg, err := regexp.Compile(`[\-\.\_\s]+`)
|
|
fmt.Println(err)
|
|
fmt.Println(replaceCharReg.ReplaceAllString("s--s.s.a b", ""))
|
|
}
|