package main
import (
"fmt"
"regexp"
)
func main() {
s1 := "FooBar"
s2 := "Foo/Bar"
s3 := "foobar/"
s4 := ""
r := regexp.MustCompile("^[A-Za-z0-9_]+$")
fmt.Println(r.MatchString(s1))
fmt.Println(r.MatchString(s2))
fmt.Println(r.MatchString(s3))
fmt.Println(r.MatchString(s4))
}
To embed this program on your website, copy the following code and paste it into your website's HTML: