Answers for "golang regex example"

Go
0

golang regex example

r1 := regexp.MustCompile("[A-Za-z0-9]")
fmt.Println(r1.ReplaceAllString("hello wordl", "@"))

r2, _ := regexp.MatchString("[^A-Za-z0-9]", "@")
fmt.Println(r2)

r3 := regexp.MustCompile("m+?")
fmt.Println(r3.ReplaceAllString("my name is budi", "*"))
Posted by: Guest on October-04-2021

Browse Popular Code Answers by Language