package main
import (
"fmt"
"regexp"
)
func main() {
pat := regexp.MustCompile(`\s`)
s := "hello world"
if (pat.MatchString(s)) {
fmt.Println("whitespace is present")
} else {
fmt.Println("whitespace is absent")
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: